From a892fcc7c26a2a0e626cb027d3079419d2bbd8a0 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 30 Jan 2023 16:54:44 +0100 Subject: [PATCH] Apply clippy suggestions for Rust 1.67 --- src/format/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/format/mod.rs b/src/format/mod.rs index 5e706db998..cfbc54ab7c 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -500,12 +500,12 @@ impl Locales { /// Formats single formatting item #[cfg(any(feature = "alloc", feature = "std", test))] #[cfg_attr(docsrs, doc(cfg(any(feature = "alloc", feature = "std"))))] -pub fn format_item<'a>( +pub fn format_item( w: &mut fmt::Formatter, date: Option<&NaiveDate>, time: Option<&NaiveTime>, off: Option<&(String, FixedOffset)>, - item: &Item<'a>, + item: &Item<'_>, ) -> fmt::Result { let mut result = String::new(); format_inner(&mut result, date, time, off, item, None)?; @@ -513,12 +513,12 @@ pub fn format_item<'a>( } #[cfg(any(feature = "alloc", feature = "std", test))] -fn format_inner<'a>( +fn format_inner( result: &mut String, date: Option<&NaiveDate>, time: Option<&NaiveTime>, off: Option<&(String, FixedOffset)>, - item: &Item<'a>, + item: &Item<'_>, locale: Option, ) -> fmt::Result { let locale = Locales::new(locale); @@ -674,7 +674,7 @@ fn format_inner<'a>( let nano = t.nanosecond() % 1_000_000_000; write!(result, "{:09}", nano) }), - TimezoneName => off.map(|&(ref name, _)| { + TimezoneName => off.map(|(name, _)| { result.push_str(name); Ok(()) }),