diff --git a/src/logging.rs b/src/logging.rs index 5fbb5e8..940f9fe 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -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, diff --git a/src/main.rs b/src/main.rs index 261af81..a3612a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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)] diff --git a/src/tests.rs b/src/tests.rs index cfd7fb3..28e7bf4 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -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 => {}