Skip to content

Commit

Permalink
Merge pull request #617 from vinipsmaker/patch-1
Browse files Browse the repository at this point in the history
cat.rs: removing need for mut variable
  • Loading branch information
Heather authored and Heather committed May 22, 2015
2 parents ca53d2b + c17f925 commit 98a86e6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/cat/cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 98a86e6

Please sign in to comment.