mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Simplify conflict implementation
This commit is contained in:
+2
-6
@@ -75,7 +75,8 @@ fn main() {
|
|||||||
.short("d")
|
.short("d")
|
||||||
.long("depth")
|
.long("depth")
|
||||||
.help("Depth to show")
|
.help("Depth to show")
|
||||||
.takes_value(true),
|
.takes_value(true)
|
||||||
|
.conflicts_with("number_of_lines"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("number_of_lines")
|
Arg::with_name("number_of_lines")
|
||||||
@@ -150,7 +151,6 @@ fn main() {
|
|||||||
.number_of_values(1)
|
.number_of_values(1)
|
||||||
.help("Specify width of output overriding the auto detection of terminal width"),
|
.help("Specify width of output overriding the auto detection of terminal width"),
|
||||||
)
|
)
|
||||||
|
|
||||||
.arg(Arg::with_name("inputs").multiple(true))
|
.arg(Arg::with_name("inputs").multiple(true))
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
@@ -181,10 +181,6 @@ fn main() {
|
|||||||
.map_err(|_| eprintln!("Ignoring bad value for depth"))
|
.map_err(|_| eprintln!("Ignoring bad value for depth"))
|
||||||
.ok()
|
.ok()
|
||||||
});
|
});
|
||||||
if options.is_present("depth") && number_of_lines != default_height {
|
|
||||||
eprintln!("Use either -n or -d. Not both");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let no_colors = init_color(options.is_present("no_colors"));
|
let no_colors = init_color(options.is_present("no_colors"));
|
||||||
let use_apparent_size = options.is_present("display_apparent_size");
|
let use_apparent_size = options.is_present("display_apparent_size");
|
||||||
|
|||||||
Reference in New Issue
Block a user