mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 06:02:36 +00:00
Fix the tests and avoid a regression
This commit is contained in:
parent
80ab697fb9
commit
f344f42bfe
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ impl Flags {
|
||||||
};
|
};
|
||||||
|
|
||||||
let recursive = matches.is_present("recursive");
|
let recursive = matches.is_present("recursive");
|
||||||
let recursion_depth = match matches.value_of("depth") {
|
let recursion_input = matches.values_of("depth").and_then(|values| values.last());
|
||||||
|
let recursion_depth = match recursion_input {
|
||||||
Some(str) if recursive || layout == Layout::Tree => match str.parse::<usize>() {
|
Some(str) if recursive || layout == Layout::Tree => match str.parse::<usize>() {
|
||||||
Ok(val) => val,
|
Ok(val) => val,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
|
|
Loading…
Reference in a new issue