mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 07:47:57 +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
@@ -503,10 +503,8 @@ fn read_tries_meta<Block: BlockT>(
|
||||
meta_column: u32,
|
||||
) -> ClientResult<ChangesTriesMeta<Block>> {
|
||||
match db.get(meta_column, meta_keys::CHANGES_TRIES_META) {
|
||||
Some(h) => match Decode::decode(&mut &h[..]) {
|
||||
Ok(h) => Ok(h),
|
||||
Err(err) => Err(ClientError::Backend(format!("Error decoding changes tries metadata: {}", err))),
|
||||
},
|
||||
Some(h) => Decode::decode(&mut &h[..])
|
||||
.map_err(|err| ClientError::Backend(format!("Error decoding changes tries metadata: {}", err))),
|
||||
None => Ok(ChangesTriesMeta {
|
||||
oldest_digest_range: None,
|
||||
oldest_pruned_digest_range_end: Zero::zero(),
|
||||
|
||||
Reference in New Issue
Block a user