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 authored Jan 22, 2022
2 parents 3c37d63 + 8d0d023 commit 287d439
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 287d439

Please sign in to comment.