commit 6d0852e01826a12b90cb19b53348886f53149d09
parent fe1e656a7d80553c9943bf69f1d58ea6bfb6934c
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date: Mon, 31 Dec 2018 20:46:22 +1300
[!] Flags require each other.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/main.rs b/src/main.rs
@@ -15,10 +15,12 @@ fn main() {
.arg(Arg::with_name("input")
.short("i")
.takes_value(true)
+ .requires("output")
.help("path to input file"))
.arg(Arg::with_name("output")
.short("o")
.takes_value(true)
+ .requires("input")
.help("path to output file"))
.get_matches();
if let (Some(input), Some(output)) = (matches.value_of("input"), matches.value_of("output")) {