mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Remove some redundant let bindings
This commit is contained in:
parent
2e1c9785dc
commit
861ddedaef
8 changed files with 24 additions and 64 deletions
|
@ -1185,16 +1185,12 @@ impl<'a> DocumentMethods for &'a Document {
|
|||
|
||||
// https://dom.spec.whatwg.org/#dom-document-characterset
|
||||
fn CharacterSet(self) -> DOMString {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let encoding_name = self.encoding_name.borrow();
|
||||
encoding_name.clone()
|
||||
self.encoding_name.borrow().clone()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-inputencoding
|
||||
fn InputEncoding(self) -> DOMString {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let encoding_name = self.encoding_name.borrow();
|
||||
encoding_name.clone()
|
||||
self.encoding_name.borrow().clone()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-content_type
|
||||
|
@ -1239,9 +1235,7 @@ impl<'a> DocumentMethods for &'a Document {
|
|||
// https://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid
|
||||
fn GetElementById(self, id: DOMString) -> Option<Root<Element>> {
|
||||
let id = Atom::from_slice(&id);
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let idmap = self.idmap.borrow();
|
||||
idmap.get(&id).map(|ref elements| (*elements)[0].root())
|
||||
self.idmap.borrow().get(&id).map(|ref elements| (*elements)[0].root())
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-createelement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue