mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Simplify some Option / Result / ? operator patterns (#2920)
* Simplify some Option / Result / ? operator patterns When they identically match a combinator on those types. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust). * adjust review comments Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c7ee98ab5f
commit
d4ddf8d7e8
@@ -142,10 +142,7 @@ impl RequestFromBackersPhase {
|
||||
);
|
||||
loop {
|
||||
// Pop the next backer, and proceed to next phase if we're out.
|
||||
let validator_index = match self.shuffled_backers.pop() {
|
||||
None => return Err(RecoveryError::Unavailable),
|
||||
Some(i) => i,
|
||||
};
|
||||
let validator_index = self.shuffled_backers.pop().ok_or_else(|| RecoveryError::Unavailable)?;
|
||||
|
||||
// Request data.
|
||||
let (req, res) = OutgoingRequest::new(
|
||||
|
||||
Reference in New Issue
Block a user