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:
François GarillotandShawn Tabrizi authored and GitHub committed 2021-04-25 20:51:01 +00:00
1 parent c7ee98ab5f
commit d4ddf8d7e8
6 files changed
+6 -22

No files matched your search

@@ -101,8 +101,7 @@ fn check_fetch_retry() {
let valid_candidate_hashes: HashSet<_> = state.cores
.get(&state.relay_chain[1])
.iter()
.map(|v| v.iter())
.flatten()
.flat_map(|v| v.iter())
.filter_map(|c| {
match c {
CoreState::Occupied(core) => Some(core.candidate_hash),