changed back from impl Trait in fn parameter to support older compiler versions
This commit is contained in:
parent
f57ac3671e
commit
5b0818e0a1
|
@ -334,13 +334,15 @@ const BAD_FORMAT: ParseError = ParseError(ParseErrorKind::BadFormat);
|
||||||
|
|
||||||
/// Tries to format given arguments with given formatting items.
|
/// Tries to format given arguments with given formatting items.
|
||||||
/// Internally used by `DelayedFormat`.
|
/// Internally used by `DelayedFormat`.
|
||||||
pub fn format<'a>(
|
pub fn format<'a, I>(
|
||||||
w: &mut fmt::Formatter,
|
w: &mut fmt::Formatter,
|
||||||
date: Option<&NaiveDate>,
|
date: Option<&NaiveDate>,
|
||||||
time: Option<&NaiveTime>,
|
time: Option<&NaiveTime>,
|
||||||
off: Option<&(String, FixedOffset)>,
|
off: Option<&(String, FixedOffset)>,
|
||||||
items: impl Iterator<Item=Item<'a>>,
|
items: I,
|
||||||
) -> fmt::Result {
|
) -> fmt::Result
|
||||||
|
where I: Iterator<Item=Item<'a>>
|
||||||
|
{
|
||||||
// full and abbreviated month and weekday names
|
// full and abbreviated month and weekday names
|
||||||
static SHORT_MONTHS: [&'static str; 12] =
|
static SHORT_MONTHS: [&'static str; 12] =
|
||||||
["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||||||
|
|
Loading…
Reference in New Issue