Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
psastras committed Jun 21, 2023
1 parent e7e5415 commit a81bd2a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sarif-fmt/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,13 +628,12 @@ fn to_writer_plain(sarif: &sarif::Sarif) -> Result<()> {
}

fn to_writer_pretty(sarif: &sarif::Sarif, color: ColorOption) -> Result<()> {
let color_choice;
match color {
ColorOption::Always => color_choice = ColorChoice::Always,
ColorOption::AlwaysAnsi => color_choice = ColorChoice::AlwaysAnsi,
ColorOption::Auto => color_choice = ColorChoice::Auto,
ColorOption::Never => color_choice = ColorChoice::Never,
}
let color_choice = match color {
ColorOption::Always => ColorChoice::Always,
ColorOption::AlwaysAnsi => ColorChoice::AlwaysAnsi,
ColorOption::Auto => ColorChoice::Auto,
ColorOption::Never => ColorChoice::Never,
};

let mut writer = StandardStream::stdout(color_choice);
let mut files = SimpleFiles::new();
Expand Down

0 comments on commit a81bd2a

Please sign in to comment.