Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Oct 3, 2024
1 parent 67af184 commit 9a42f14
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ where
T: std::str::FromStr<Err = ParserError>,
{
let str = shellexpand::env(str).map_err(|e| error2(e, 0..0))?;
str.parse::<T>().map_err(|e| {
str.parse::<T>().inspect_err(|e| {
let writer = StandardStream::stderr(term::termcolor::ColorChoice::Auto);
let config = term::Config::default();
let file = SimpleFile::new(name, str);
term::emit(&mut writer.lock(), &config, &file, &report(&e)).unwrap();
e
term::emit(&mut writer.lock(), &config, &file, &report(e)).unwrap();
})
}

0 comments on commit 9a42f14

Please sign in to comment.