Skip to content

Commit

Permalink
Rollup merge of rust-lang#93116 - rust-lang:oli-obk-patch-1, r=jackh726
Browse files Browse the repository at this point in the history
Simplify use of `map_or`
  • Loading branch information
matthiaskrgr committed Jan 22, 2022
2 parents d607f89 + 8d0d023 commit 0706cd4
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 0706cd4

Please sign in to comment.