Only run SharedCow::to_mut
once
Peeping at the `cargo asm` output that this can't be elided due to side effects of the atomic reads, so lifting it manually should save us some extra work.
This commit is contained in:
parent
e62356f5ec
commit
4d81d367fe
|
@ -102,12 +102,13 @@ fn default(
|
||||||
val: ref mut record,
|
val: ref mut record,
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
if let Some(val) = record.to_mut().get_mut(&column.item) {
|
let record = record.to_mut();
|
||||||
|
if let Some(val) = record.get_mut(&column.item) {
|
||||||
if matches!(val, Value::Nothing { .. }) {
|
if matches!(val, Value::Nothing { .. }) {
|
||||||
*val = value.clone();
|
*val = value.clone();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
record.to_mut().push(column.item.clone(), value.clone());
|
record.push(column.item.clone(), value.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
item
|
item
|
||||||
|
|
Loading…
Reference in New Issue
Block a user