fixed args to only execute one set if multiple sets are passed

This commit is contained in:
ika4422 2026-04-08 12:12:21 +01:00
parent 192daf589d
commit 32734cc91c
No known key found for this signature in database
GPG key ID: F7FBF981D2A33785
2 changed files with 8 additions and 10 deletions

View file

@ -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);
}
}