From 74ba83ba27056e5bb610327d37c488f2b212af86 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Sat, 6 Apr 2024 13:30:21 +0200 Subject: [PATCH] Take `pad` by value --- src/format/formatting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/format/formatting.rs b/src/format/formatting.rs index 6c3fc69692..5cc73a4cf6 100644 --- a/src/format/formatting.rs +++ b/src/format/formatting.rs @@ -103,7 +103,7 @@ impl<'a, I: Iterator + Clone, B: Borrow>> DelayedFormat { Item::Literal(s) | Item::Space(s) => w.write_str(s), #[cfg(feature = "alloc")] Item::OwnedLiteral(ref s) | Item::OwnedSpace(ref s) => w.write_str(s), - Item::Numeric(ref spec, ref pad) => self.format_numeric(w, spec, pad), + Item::Numeric(ref spec, pad) => self.format_numeric(w, spec, pad), Item::Fixed(ref spec) => self.format_fixed(w, spec), Item::Error => Err(fmt::Error), }?; @@ -112,7 +112,7 @@ impl<'a, I: Iterator + Clone, B: Borrow>> DelayedFormat { } #[cfg(feature = "alloc")] - fn format_numeric(&self, w: &mut impl Write, spec: &Numeric, pad: &Pad) -> fmt::Result { + fn format_numeric(&self, w: &mut impl Write, spec: &Numeric, pad: Pad) -> fmt::Result { use self::Numeric::*; let (width, v) = match (spec, self.date, self.time) {