mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Remove some more unnecessary let bindings
This commit is contained in:
parent
2947d78e4e
commit
bc1eb97671
11 changed files with 29 additions and 84 deletions
|
@ -468,10 +468,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
|
|||
let check_anchor = |&node: &&HTMLAnchorElement| {
|
||||
let elem = ElementCast::from_ref(node);
|
||||
elem.get_attribute(&ns!(""), &atom!("name")).map_or(false, |attr| {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let attr = attr.r();
|
||||
let value = attr.value();
|
||||
&**value == &*fragid
|
||||
&**attr.r().value() == &*fragid
|
||||
})
|
||||
};
|
||||
let doc_node = NodeCast::from_ref(self);
|
||||
|
@ -1562,10 +1559,7 @@ impl<'a> DocumentMethods for &'a Document {
|
|||
return false;
|
||||
}
|
||||
element.get_attribute(&ns!(""), &atom!("name")).map_or(false, |attr| {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let attr = attr.r();
|
||||
let value = attr.value();
|
||||
&**value == &*name
|
||||
&**attr.r().value() == &*name
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue