mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57: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
@@ -207,10 +207,7 @@ where
|
||||
let call_data = account.encode();
|
||||
let future_best_header = future_best_header
|
||||
.and_then(move |maybe_best_header| ready(
|
||||
match maybe_best_header {
|
||||
Some(best_header) => Ok(best_header),
|
||||
None => Err(ClientError::UnknownBlock(format!("{}", best_hash))),
|
||||
}
|
||||
maybe_best_header.ok_or_else(|| { ClientError::UnknownBlock(format!("{}", best_hash)) })
|
||||
));
|
||||
let future_nonce = future_best_header.and_then(move |best_header|
|
||||
fetcher.remote_call(RemoteCallRequest {
|
||||
|
||||
Reference in New Issue
Block a user