mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
refactor: rename changed to formatted
This commit is contained in:
parent
b58e560971
commit
ac74bc5ce3
2 changed files with 8 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue