From 5b0818e0a1ba1dac59b984b4d6ad26f29aad2b41 Mon Sep 17 00:00:00 2001 From: Samokhin Ilya Date: Sun, 23 Jun 2019 10:09:47 +0300 Subject: [PATCH] changed back from impl Trait in fn parameter to support older compiler versions --- src/format/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/format/mod.rs b/src/format/mod.rs index 565e648..a0a9333 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -334,13 +334,15 @@ const BAD_FORMAT: ParseError = ParseError(ParseErrorKind::BadFormat); /// Tries to format given arguments with given formatting items. /// Internally used by `DelayedFormat`. -pub fn format<'a>( +pub fn format<'a, I>( w: &mut fmt::Formatter, date: Option<&NaiveDate>, time: Option<&NaiveTime>, off: Option<&(String, FixedOffset)>, - items: impl Iterator>, -) -> fmt::Result { + items: I, +) -> fmt::Result + where I: Iterator> +{ // full and abbreviated month and weekday names static SHORT_MONTHS: [&'static str; 12] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];