Unverified Commit 05e569bf authored by Michael Müller's avatar Michael Müller Committed by GitHub
Browse files

Fix clippy error: Manual implementation of `Option::map` (#717)

parent b66730ba
Pipeline #126988 failed with stages
in 11 minutes and 26 seconds
......@@ -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()
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment