Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Sep 9, 2024
1 parent c3f5a77 commit f2689ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn record_line_log(
}

/// Get the color of a log level
fn get_log_color(log_level: Level) -> Color {
const fn get_log_color(log_level: Level) -> Color {
match log_level {
Info => Color::Cyan,
Warn => Color::Yellow,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![warn(clippy::missing_docs_in_private_items)]
#![warn(clippy::pedantic)]
#![allow(clippy::wildcard_imports)]
#![allow(clippy::multiple_crate_versions)]
#![allow(clippy::struct_excessive_bools)]
#![allow(clippy::module_name_repetitions)]

Expand Down
8 changes: 2 additions & 6 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@ fn test_file(source_file: &str, target_file: &str) -> bool {
match change.tag() {
ChangeTag::Delete => print!(
"{} {}",
format!("@ {}:", change.old_index().unwrap())
.blue()
.bold(),
format!("@ {}:", change.old_index().unwrap()).blue().bold(),
format!("- {}", change).red().bold(),
),
ChangeTag::Insert => print!(
"{} {}",
format!("@ {}:", change.new_index().unwrap())
.blue()
.bold(),
format!("@ {}:", change.new_index().unwrap()).blue().bold(),
format!("+ {}", change).green().bold(),
),
ChangeTag::Equal => {}
Expand Down

0 comments on commit f2689ac

Please sign in to comment.