Skip to content

Commit

Permalink
Simplify use of map_or
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk authored Jan 20, 2022
1 parent 74fbbef commit 8d0d023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/coverage/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl BasicCoverageBlockData {
pub fn take_edge_counters(
&mut self,
) -> Option<impl Iterator<Item = (BasicCoverageBlock, CoverageKind)>> {
self.edge_from_bcbs.take().map_or(None, |m| Some(m.into_iter()))
self.edge_from_bcbs.take().map(|m| m.into_iter())
}

pub fn id(&self) -> String {
Expand Down

0 comments on commit 8d0d023

Please sign in to comment.