Skip to content

Commit

Permalink
changed back from impl Trait in fn parameter to support older compile…
Browse files Browse the repository at this point in the history
…r versions
  • Loading branch information
SamokhinIlya committed Jun 23, 2019
1 parent f57ac36 commit 5b0818e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/format/mod.rs
Expand Up @@ -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<Item=Item<'a>>,
) -> fmt::Result {
items: I,
) -> fmt::Result
where I: Iterator<Item=Item<'a>>
{
// 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"];
Expand Down

0 comments on commit 5b0818e

Please sign in to comment.