Simplify some pattern-matches (#16402)
When those match an exact combinator on Option / Result. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).
This commit is contained in:
committed by
GitHub
parent
bb9d2fd07a
commit
b08cff9e77
@ -410,15 +410,16 @@ fn parse_distribute_stake_args(
|
||||
)?;
|
||||
|
||||
let lockup_authority_str = value_t!(matches, "lockup_authority", String).ok();
|
||||
let lockup_authority = match lockup_authority_str {
|
||||
Some(path) => Some(signer_from_path(
|
||||
&signer_matches,
|
||||
&path,
|
||||
"lockup authority",
|
||||
&mut wallet_manager,
|
||||
)?),
|
||||
None => None,
|
||||
};
|
||||
let lockup_authority = lockup_authority_str
|
||||
.map(|path| {
|
||||
signer_from_path(
|
||||
&signer_matches,
|
||||
&path,
|
||||
"lockup authority",
|
||||
&mut wallet_manager,
|
||||
)
|
||||
})
|
||||
.transpose()?;
|
||||
|
||||
let stake_args = StakeArgs {
|
||||
stake_account_address,
|
||||
|
Reference in New Issue
Block a user