chore: bump strum (#6392)

This commit is contained in:
Matthias Seitz
2024-02-04 15:23:59 +01:00
committed by GitHub
parent 05c1d1d4a2
commit ae9158c95b
4 changed files with 48 additions and 20 deletions

View File

@@ -607,7 +607,7 @@ impl TypedValueParser for RpcModuleSelectionValueParser {
value.to_str().ok_or_else(|| clap::Error::new(clap::error::ErrorKind::InvalidUtf8))?;
val.parse::<RpcModuleSelection>().map_err(|err| {
let arg = arg.map(|a| a.to_string()).unwrap_or_else(|| "...".to_owned());
let possible_values = RethRpcModule::all_variants().to_vec().join(",");
let possible_values = RethRpcModule::all_variant_names().to_vec().join(",");
let msg = format!(
"Invalid value '{val}' for {arg}: {err}.\n [possible values: {possible_values}]"
);
@@ -616,7 +616,7 @@ impl TypedValueParser for RpcModuleSelectionValueParser {
}
fn possible_values(&self) -> Option<Box<dyn Iterator<Item = PossibleValue> + '_>> {
let values = RethRpcModule::all_variants().iter().map(PossibleValue::new);
let values = RethRpcModule::all_variant_names().iter().map(PossibleValue::new);
Some(Box::new(values))
}
}