mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Don't clone the result of AttrHelpersForLayout::local_name
There is no need to do that. Embrace returning borrows from the DOM, it good.
This commit is contained in:
parent
4db84bede8
commit
47c9f19121
2 changed files with 5 additions and 5 deletions
|
@ -578,7 +578,7 @@ pub unsafe fn get_attr_for_layout<'dom>(
|
|||
.iter()
|
||||
.find(|attr| {
|
||||
let attr = attr.to_layout();
|
||||
*name == attr.local_name() && (*attr.unsafe_get()).namespace() == namespace
|
||||
name == attr.local_name() && (*attr.unsafe_get()).namespace() == namespace
|
||||
})
|
||||
.map(|attr| attr.to_layout())
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ impl RawLayoutElementHelpers for Element {
|
|||
.iter()
|
||||
.filter_map(|attr| {
|
||||
let attr = attr.to_layout();
|
||||
if *name == attr.local_name() {
|
||||
if name == attr.local_name() {
|
||||
Some(attr.value())
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue