Simplify use of map_or
This commit is contained in:
parent
74fbbefea8
commit
8d0d023964
1 changed files with 1 additions and 1 deletions
|
@ -418,7 +418,7 @@ impl BasicCoverageBlockData {
|
||||||
pub fn take_edge_counters(
|
pub fn take_edge_counters(
|
||||||
&mut self,
|
&mut self,
|
||||||
) -> Option<impl Iterator<Item = (BasicCoverageBlock, CoverageKind)>> {
|
) -> 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 {
|
pub fn id(&self) -> String {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue