Skip to content

Commit

Permalink
done requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gasu16 authored and zwpaper committed Nov 26, 2021
1 parent 3a28c71 commit fba600d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ pub fn build() -> App<'static, 'static> {
Arg::with_name("directory-only")
.short("d")
.long("directory-only")
//.conflicts_with("all")
//.conflicts_with("almost-all")
.conflicts_with("depth")
.conflicts_with("recursive")
.help("Display directories themselves, and not their contents (recursively when used with --tree)"),
Expand Down
12 changes: 4 additions & 8 deletions src/flags/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@ impl Configurable<Self> for Display {
/// corresponding `Display` variant in a [Some]. If neither of them is passed, this returns
/// [None].
fn from_arg_matches(matches: &ArgMatches) -> Option<Self> {
if matches.is_present("all") {
if matches.is_present("directory-only") {
Some(Self::DirectoryOnly)
} else {
Some(Self::All)
}
if matches.is_present("directory-only") {
Some(Self::DirectoryOnly)
} else if matches.is_present("almost-all") {
Some(Self::AlmostAll)
} else if matches.is_present("directory-only") {
Some(Self::DirectoryOnly)
} else if matches.is_present("all") {
Some(Self::All)
} else {
None
}
Expand Down

0 comments on commit fba600d

Please sign in to comment.