Skip to content

Commit

Permalink
Delete identity conversion in format_description::parse_owned (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 16, 2024
1 parent 7ce6e19 commit 5b0c627
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions time/src/format_description/parse/mod.rs
Expand Up @@ -80,9 +80,7 @@ pub fn parse_owned<const VERSION: usize>(
let mut lexed = lexer::lex::<VERSION>(s.as_bytes());
let ast = ast::parse::<_, VERSION>(&mut lexed);
let format_items = format_item::parse(ast);
let items = format_items
.map(|res| res.map(Into::into))
.collect::<Result<Box<_>, _>>()?;
let items = format_items.collect::<Result<Box<_>, _>>()?;
Ok(items.into())
}

Expand Down

0 comments on commit 5b0c627

Please sign in to comment.