Disallow bad combination of arguments in keygen grind (#17251)

* Use constant for outfile sentinel value

* Require --use-mnemonic flag when --no-outfile flag passed to keygen grind
This commit is contained in:
steviez
2021-05-18 10:35:07 -05:00
committed by GitHub
parent f7b0184f81
commit 6cba53421e
3 changed files with 13 additions and 6 deletions

View File

@@ -17,6 +17,9 @@ use {
std::{str::FromStr, sync::Arc},
};
// Sentinel value used to indicate to write to screen instead of file
pub const STDOUT_OUTFILE_TOKEN: &str = "-";
// Return parsed values from matches at `name`
pub fn values_of<T>(matches: &ArgMatches<'_>, name: &str) -> Option<Vec<T>>
where