aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/characterdata.rs8
-rw-r--r--components/script/dom/document.rs12
-rw-r--r--components/script/dom/domtokenlist.rs19
-rw-r--r--components/script/dom/formdata.rs4
-rw-r--r--components/script/dom/htmlinputelement.rs4
-rw-r--r--components/script/dom/node.rs9
-rw-r--r--components/script/dom/storageevent.rs16
-rw-r--r--components/script/dom/window.rs16
8 files changed, 24 insertions, 64 deletions
diff --git a/components/script/dom/characterdata.rs b/components/script/dom/characterdata.rs
index 0270bff996f..707a801f70f 100644
--- a/components/script/dom/characterdata.rs
+++ b/components/script/dom/characterdata.rs
@@ -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
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 9e15292676f..0597a3fcea1 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -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
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs
index fc56673733c..b3656ae4b7c 100644
--- a/components/script/dom/domtokenlist.rs
+++ b/components/script/dom/domtokenlist.rs
@@ -67,20 +67,16 @@ impl<'a> DOMTokenListMethods for &'a DOMTokenList {
// https://dom.spec.whatwg.org/#dom-domtokenlist-length
fn Length(self) -> u32 {
self.attribute().map(|attr| {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
- let value = attr.value();
- value.tokens().map(|tokens| tokens.len()).unwrap_or(0)
+ attr.value().tokens().map(|tokens| tokens.len()).unwrap_or(0)
}).unwrap_or(0) as u32
}
// https://dom.spec.whatwg.org/#dom-domtokenlist-item
fn Item(self, index: u32) -> Option<DOMString> {
self.attribute().and_then(|attr| {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
- let value = attr.value();
- value.tokens().and_then(|tokens| {
+ attr.value().tokens().and_then(|tokens| {
tokens.get(index as usize).map(|token| (**token).to_owned())
})
})
@@ -96,13 +92,12 @@ impl<'a> DOMTokenListMethods for &'a DOMTokenList {
fn Contains(self, token: DOMString) -> Fallible<bool> {
self.check_token_exceptions(&token).map(|token| {
self.attribute().map(|attr| {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
- let value = attr.value();
- value.tokens()
- .expect("Should have parsed this attribute")
- .iter()
- .any(|atom| *atom == token)
+ attr.value()
+ .tokens()
+ .expect("Should have parsed this attribute")
+ .iter()
+ .any(|atom| *atom == token)
}).unwrap_or(false)
})
}
diff --git a/components/script/dom/formdata.rs b/components/script/dom/formdata.rs
index bb111fa5bd2..843dd515d8c 100644
--- a/components/script/dom/formdata.rs
+++ b/components/script/dom/formdata.rs
@@ -98,9 +98,7 @@ impl<'a> FormDataMethods for &'a FormData {
}
fn Has(self, name: DOMString) -> bool {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let data = self.data.borrow();
- data.contains_key(&name)
+ self.data.borrow().contains_key(&name)
}
#[allow(unrooted_must_root)]
fn Set(self, name: DOMString, value: &Blob, filename: Option<DOMString>) {
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index e0590e6bf6b..2f3db69b43d 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -266,9 +266,7 @@ impl<'a> HTMLInputElementMethods for &'a HTMLInputElement {
// https://html.spec.whatwg.org/multipage/#dom-input-value
fn Value(self) -> DOMString {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let textinput = self.textinput.borrow();
- textinput.get_content()
+ self.textinput.borrow().get_content()
}
// https://html.spec.whatwg.org/multipage/#dom-input-value
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 1fbc6a63f2e..b69dd3fad46 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -983,13 +983,11 @@ impl<'a> NodeHelpers for &'a Node {
}
fn get_unique_id(self) -> String {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
if self.unique_id.borrow().is_empty() {
let mut unique_id = self.unique_id.borrow_mut();
*unique_id = uuid::Uuid::new_v4().to_simple_string();
}
- let id = self.unique_id.borrow();
- id.clone()
+ self.unique_id.borrow().clone()
}
fn summarize(self) -> NodeInfo {
@@ -2318,10 +2316,7 @@ impl<'a> NodeMethods for &'a Node {
fn is_equal_characterdata(node: &Node, other: &Node) -> bool {
let characterdata: &CharacterData = CharacterDataCast::to_ref(node).unwrap();
let other_characterdata: &CharacterData = CharacterDataCast::to_ref(other).unwrap();
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let own_data = characterdata.data();
- let other_data = other_characterdata.data();
- *own_data == *other_data
+ *characterdata.data() == *other_characterdata.data()
}
fn is_equal_element_attrs(node: &Node, other: &Node) -> bool {
let element: &Element = ElementCast::to_ref(node).unwrap();
diff --git a/components/script/dom/storageevent.rs b/components/script/dom/storageevent.rs
index 55cf51ed097..ce2c352630d 100644
--- a/components/script/dom/storageevent.rs
+++ b/components/script/dom/storageevent.rs
@@ -89,27 +89,19 @@ impl StorageEvent {
impl<'a> StorageEventMethods for &'a StorageEvent {
fn GetKey(self) -> Option<DOMString> {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let key = self.key.borrow();
- key.clone()
+ self.key.borrow().clone()
}
fn GetOldValue(self) -> Option<DOMString> {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let oldValue = self.oldValue.borrow();
- oldValue.clone()
+ self.oldValue.borrow().clone()
}
fn GetNewValue(self) -> Option<DOMString> {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let newValue = self.newValue.borrow();
- newValue.clone()
+ self.newValue.borrow().clone()
}
fn Url(self) -> DOMString {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let url = self.url.borrow();
- url.clone()
+ self.url.borrow().clone()
}
fn GetStorageArea(self) -> Option<Root<Storage>> {
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 43fd7429832..88c36ab3020 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -336,9 +336,7 @@ impl<'a> WindowMethods for &'a Window {
}
fn Document(self) -> Root<Document> {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let context = self.browser_context();
- context.as_ref().unwrap().active_document()
+ self.browser_context().as_ref().unwrap().active_document()
}
// https://html.spec.whatwg.org/#dom-location
@@ -362,9 +360,7 @@ impl<'a> WindowMethods for &'a Window {
// https://html.spec.whatwg.org/#dom-frameelement
fn GetFrameElement(self) -> Option<Root<Element>> {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let context = self.browser_context();
- context.as_ref().unwrap().frame_element()
+ self.browser_context().as_ref().unwrap().frame_element()
}
// https://html.spec.whatwg.org/#dom-navigator
@@ -792,9 +788,7 @@ impl<'a> WindowHelpers for &'a Window {
}
fn steal_fragment_name(self) -> Option<String> {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let mut name = self.fragment_name.borrow_mut();
- name.take()
+ self.fragment_name.borrow_mut().take()
}
fn set_window_size(self, size: WindowSizeData) {
@@ -838,9 +832,7 @@ impl<'a> WindowHelpers for &'a Window {
}
fn layout_is_idle(self) -> bool {
- // FIXME(https://github.com/rust-lang/rust/issues/23338)
- let port = self.layout_join_port.borrow();
- port.is_none()
+ self.layout_join_port.borrow().is_none()
}
fn get_pending_reflow_count(self) -> u32 {