Skip to content

Commit

Permalink
thanks clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Dec 13, 2022
1 parent 0057c0d commit 82dc467
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub fn aggregate(
}

fn path_color_of(path: impl AsRef<Path>) -> Option<Color> {
(!path.as_ref().is_file()).then(|| Color::Cyan)
(!path.as_ref().is_file()).then_some(Color::Cyan)
}

fn output_colored_path(
Expand Down
6 changes: 1 addition & 5 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ pub struct WalkResult {

impl WalkResult {
pub fn to_exit_code(&self) -> i32 {
if self.num_errors > 0 {
1
} else {
0
}
i32::from(self.num_errors > 0)
}
}

0 comments on commit 82dc467

Please sign in to comment.