fixed args to only execute one set if multiple sets are passed
This commit is contained in:
parent
192daf589d
commit
32734cc91c
2 changed files with 8 additions and 10 deletions
14
src/main.rs
14
src/main.rs
|
|
@ -68,6 +68,11 @@ struct Args {
|
|||
fn main() {
|
||||
let args = Args::parse();
|
||||
|
||||
if args.license {
|
||||
println!("{}", include_str!("../LICENSE"));
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
if let Some(pattern) = args.generate {
|
||||
for _ in 0..args.count {
|
||||
let generated = generate_from_pattern(&pattern, args.upper);
|
||||
|
|
@ -95,9 +100,7 @@ fn main() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(input) = args.encode {
|
||||
} else if let Some(input) = args.encode {
|
||||
let encode_as_text = args.text || input.parse::<BigUint>().is_err();
|
||||
|
||||
if encode_as_text {
|
||||
|
|
@ -149,9 +152,4 @@ fn main() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if args.license {
|
||||
println!("{}", include_str!("../LICENSE"));
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue