mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12: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
@@ -463,8 +463,7 @@ impl State {
|
||||
if !range.is_empty() && !blocks.is_empty() {
|
||||
self.blocks_by_number
|
||||
.range(range)
|
||||
.map(|(_number, hashes)| hashes)
|
||||
.flatten()
|
||||
.flat_map(|(_number, hashes)| hashes)
|
||||
.for_each(|hash| {
|
||||
if let Some(entry) = blocks.get_mut(hash) {
|
||||
entry.known_by.remove(&peer_id);
|
||||
|
||||
Reference in New Issue
Block a user