diff --git a/src/alejandra_cli/src/ads/star.txt b/src/alejandra_cli/src/ads/star.txt index a8157f2..71cf35a 100644 --- a/src/alejandra_cli/src/ads/star.txt +++ b/src/alejandra_cli/src/ads/star.txt @@ -1,2 +1,2 @@ If Alejandra is useful to you, please add your star to the repository. -Thank you! https://github.com/sponsors/kamadorueda +Thank you! https://github.com/kamadorueda/alejandra diff --git a/src/alejandra_cli/src/cli.rs b/src/alejandra_cli/src/cli.rs index 7bbd68c..969a9c8 100644 --- a/src/alejandra_cli/src/cli.rs +++ b/src/alejandra_cli/src/cli.rs @@ -84,7 +84,7 @@ pub(crate) fn simple( if !quiet { eprintln!( "{} {paths_len} file{} using {threads} thread{}.", - if in_place { "Formatting" } else { "Checking style in" }, + "Checking style in", if paths_len == 1 { "" } else { "s" }, if threads == 1 { "" } else { "s" }, ); @@ -107,7 +107,7 @@ pub(crate) fn simple( println!( "{}: {path}", if in_place { - "Changed" + "Formatted" } else { "Requires formatting" }, @@ -187,12 +187,11 @@ pub fn main() -> std::io::Result<()> { "{}! {changed} file{} {}.", if in_place { "Success" } else { "Alert" }, if changed == 1 { "" } else { "s" }, - if changed == 1 { - if in_place { "was changed" } else { "requires formatting" } - } else if in_place { - "were changed" - } else { - "require formatting" + match (changed == 1, in_place) { + (false, true) => "were formatted", + (false, false) => "require formatting", + (true, true) => "was formatted", + (true, false) => "requires formatting", } ); }