diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2020-11-30 12:58:44 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2020-11-30 12:58:44 +0100 |
| commit | 678d45e7ae09510796d27a80ecd894f6a1ad8279 (patch) | |
| tree | 56e9dc6cc093faadd86da1edebc76334c00b6a74 /src/main.rs | |
| parent | bd7a6880f5dce74fd154f593a5a5f7034affeee4 (diff) | |
generate random mnemonic
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 74b1bc5..43d938e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,20 +1,30 @@ mod cmd; +mod hash; mod mnemonic; +mod rand; use crate::cmd::*; +use std::process; use structopt::StructOpt; #[derive(Debug, StructOpt)] #[structopt( name = "hdwallet", - about = "Hierarchical deterministic wallet for Ethereum", + about = "Hierarchical deterministic wallet for Ethereum" )] enum Options { New(new::Options), } fn main() { - match Options::from_args() { + if let Err(err) = match Options::from_args() { Options::New(options) => new::run(options), + } { + if cfg!(debug_assertions) { + eprintln!("ERROR: {:?}", err); + } else { + eprintln!("ERROR: {}", err); + } + process::exit(-1); } } |
