Use Option::get_or_default
This commit is contained in:
@@ -392,10 +392,7 @@ impl BasicCoverageBlockData {
|
||||
}
|
||||
}
|
||||
let operand = counter_kind.as_operand_id();
|
||||
if let Some(replaced) = self
|
||||
.edge_from_bcbs
|
||||
.get_or_insert_with(FxHashMap::default)
|
||||
.insert(from_bcb, counter_kind)
|
||||
if let Some(replaced) = self.edge_from_bcbs.get_or_default().insert(from_bcb, counter_kind)
|
||||
{
|
||||
Error::from_string(format!(
|
||||
"attempt to set an edge counter more than once; from_bcb: \
|
||||
|
||||
Reference in New Issue
Block a user