Skip to content

Commit

Permalink
Fix clippy error: Manual implementation of Option::map
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed Mar 5, 2021
1 parent b66730b commit f14d2da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/storage/src/lazy/lazy_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ where
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_map()
.entries(self.0.iter().enumerate().filter_map(|(key, entry)| {
match entry {
Some(entry) => Some((key, entry)),
None => None,
}
}))
.entries(
self.0
.iter()
.enumerate()
.filter_map(|(key, entry)| entry.as_ref().map(|entry| (key, entry))),
)
.finish()
}
}
Expand Down

0 comments on commit f14d2da

Please sign in to comment.