Skip to content

Commit 74ba83b

Browse files
committed
Take pad by value
1 parent 78e79db commit 74ba83b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/format/formatting.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl<'a, I: Iterator<Item = B> + Clone, B: Borrow<Item<'a>>> DelayedFormat<I> {
103103
Item::Literal(s) | Item::Space(s) => w.write_str(s),
104104
#[cfg(feature = "alloc")]
105105
Item::OwnedLiteral(ref s) | Item::OwnedSpace(ref s) => w.write_str(s),
106-
Item::Numeric(ref spec, ref pad) => self.format_numeric(w, spec, pad),
106+
Item::Numeric(ref spec, pad) => self.format_numeric(w, spec, pad),
107107
Item::Fixed(ref spec) => self.format_fixed(w, spec),
108108
Item::Error => Err(fmt::Error),
109109
}?;
@@ -112,7 +112,7 @@ impl<'a, I: Iterator<Item = B> + Clone, B: Borrow<Item<'a>>> DelayedFormat<I> {
112112
}
113113

114114
#[cfg(feature = "alloc")]
115-
fn format_numeric(&self, w: &mut impl Write, spec: &Numeric, pad: &Pad) -> fmt::Result {
115+
fn format_numeric(&self, w: &mut impl Write, spec: &Numeric, pad: Pad) -> fmt::Result {
116116
use self::Numeric::*;
117117

118118
let (width, v) = match (spec, self.date, self.time) {

0 commit comments

Comments
 (0)