more clippy fixes: clippy::{iter_cloned_collect, unwarp_or_else_default, option_map_or_none}
This commit is contained in:
parent
e6e956dade
commit
6ef8648a48
4 changed files with 5 additions and 7 deletions
|
@ -292,10 +292,8 @@ impl DebugCounters {
|
|||
}
|
||||
|
||||
pub fn some_block_label(&self, operand: ExpressionOperandId) -> Option<&String> {
|
||||
self.some_counters.as_ref().map_or(None, |counters| {
|
||||
counters
|
||||
.get(&operand)
|
||||
.map_or(None, |debug_counter| debug_counter.some_block_label.as_ref())
|
||||
self.some_counters.as_ref().and_then(|counters| {
|
||||
counters.get(&operand).and_then(|debug_counter| debug_counter.some_block_label.as_ref())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue