mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -50,9 +50,7 @@ impl CharacterData {
|
|||
impl<'a> CharacterDataMethods for &'a CharacterData {
|
||||
// https://dom.spec.whatwg.org/#dom-characterdata-data
|
||||
fn Data(self) -> DOMString {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let data = self.data.borrow();
|
||||
data.clone()
|
||||
self.data.borrow().clone()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-characterdata-data
|
||||
|
@ -62,9 +60,7 @@ impl<'a> CharacterDataMethods for &'a CharacterData {
|
|||
|
||||
// https://dom.spec.whatwg.org/#dom-characterdata-length
|
||||
fn Length(self) -> u32 {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let data = self.data.borrow();
|
||||
data.chars().count() as u32
|
||||
self.data.borrow().chars().count() as u32
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-characterdata-substringdataoffset-count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue