mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 05:17:58 +00:00
Simplify some Option / Result / ? operator patterns (#8653)
* Simplify some Option / Result / ? operator patterns When those match a combinator exactly. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust). * adjust after review * adjust post-review
This commit is contained in:
committed by
GitHub
parent
541692c4a8
commit
052be8bbef
@@ -169,10 +169,8 @@ impl TryRuntimeCmd {
|
||||
uri: url.into(),
|
||||
state_snapshot: snapshot_path.as_ref().map(SnapshotConfig::new),
|
||||
modules: modules.clone().unwrap_or_default(),
|
||||
at: match block_at {
|
||||
Some(b) => Some(b.parse().map_err(|e| format!("Could not parse hash: {:?}", e))?),
|
||||
None => None,
|
||||
},
|
||||
at: block_at.as_ref()
|
||||
.map(|b| b.parse().map_err(|e| format!("Could not parse hash: {:?}", e))).transpose()?,
|
||||
..Default::default()
|
||||
})),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user