mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 22:17:45 +00:00
Merge pull request #617 from vinipsmaker/patch-1
cat.rs: removing need for mut variable
This commit is contained in:
commit
98a86e60c8
1 changed files with 7 additions and 7 deletions
|
@ -58,13 +58,13 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
return 0;
|
||||
}
|
||||
|
||||
let mut number_mode = NumberingMode::NumberNone;
|
||||
if matches.opt_present("n") {
|
||||
number_mode = NumberingMode::NumberAll;
|
||||
}
|
||||
if matches.opt_present("b") {
|
||||
number_mode = NumberingMode::NumberNonEmpty;
|
||||
}
|
||||
let number_mode = if matches.opt_present("b") {
|
||||
NumberingMode::NumberNonEmpty
|
||||
} else if matches.opt_present("n") {
|
||||
NumberingMode::NumberAll
|
||||
} else {
|
||||
NumberingMode::NumberNone
|
||||
};
|
||||
let show_nonprint = matches.opts_present(&["A".to_string(), "e".to_string(),
|
||||
"t".to_string(), "v".to_string()]);
|
||||
let show_ends = matches.opts_present(&["E".to_string(), "A".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue