[clap-v3-utils] Replace `pubkeys_sigs_of` with `try_pubkeys_sigs_of` (#34801)

* replace `pubkeys_sigs_of` with `try_pubkeys_sigs_of`

* propagate error from `try_pubkeys_sigs_of` to the caller
This commit is contained in:
samkim-crypto 2024-01-20 11:20:51 +09:00 committed by GitHub
parent 3916c31cb4
commit c071cf5cd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
use {
crate::{
input_parsers::{pubkeys_sigs_of, STDOUT_OUTFILE_TOKEN},
input_parsers::{signer::try_pubkeys_sigs_of, STDOUT_OUTFILE_TOKEN},
offline::{SIGNER_ARG, SIGN_ONLY_ARG},
ArgConstant,
},
@ -807,7 +807,7 @@ pub fn signer_from_path_with_config(
}
}
SignerSourceKind::Pubkey(pubkey) => {
let presigner = pubkeys_sigs_of(matches, SIGNER_ARG.name)
let presigner = try_pubkeys_sigs_of(matches, SIGNER_ARG.name)?
.as_ref()
.and_then(|presigners| presigner_from_pubkey_sigs(&pubkey, presigners));
if let Some(presigner) = presigner {