added value names for args and implemented string conversion for bases
This commit is contained in:
parent
5ac61418a9
commit
b68815c29c
2 changed files with 86 additions and 10 deletions
12
src/main.rs
12
src/main.rs
|
|
@ -40,10 +40,16 @@ fn main() {
|
|||
}
|
||||
|
||||
if let Some(pattern) = args.generate {
|
||||
commands::run_generate(&pattern, args.count, args.base, args.no_doll, args.text);
|
||||
commands::run_generate(
|
||||
&pattern,
|
||||
args.count,
|
||||
args.base.radix(),
|
||||
args.no_doll,
|
||||
args.text,
|
||||
);
|
||||
} else if let Some(input) = args.encode {
|
||||
commands::run_encode(&input, args.base, args.text);
|
||||
commands::run_encode(&input, args.base.radix(), args.text);
|
||||
} else if let Some(input) = args.decode {
|
||||
commands::run_decode(&input, args.base, args.text);
|
||||
commands::run_decode(&input, args.base.radix(), args.text);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue