diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-08-15 07:31:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-15 07:31:04 -0500 |
commit | 7d9b82b9efa7b10a2e34d93df5ac535d99518f7a (patch) | |
tree | 6f19f8562d57258c06ee21ee2bdbd85f9ae2cb64 /components/script/dom/document.rs | |
parent | 41fb10c58995781d595a233afae0758427ad5cc5 (diff) | |
parent | b5a4b8d6a09a71bd3a4ff4ae68e7a9639f9dcaad (diff) | |
download | servo-7d9b82b9efa7b10a2e34d93df5ac535d99518f7a.tar.gz servo-7d9b82b9efa7b10a2e34d93df5ac535d99518f7a.zip |
Auto merge of #18046 - servo:rustup, r=emilio
Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18046)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 4bc314fc7e4..39f5a8e6d38 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -633,7 +633,7 @@ impl Document { // reset_form_owner_for_listeners -> reset_form_owner -> GetElementById { let mut id_map = self.id_map.borrow_mut(); - let mut elements = id_map.entry(id.clone()).or_insert(Vec::new()); + let elements = id_map.entry(id.clone()).or_insert(Vec::new()); elements.insert_pre_order(element, root.r().upcast::<Node>()); } self.reset_form_owner_for_listeners(&id); @@ -642,7 +642,7 @@ impl Document { pub fn register_form_id_listener<T: ?Sized + FormControl>(&self, id: DOMString, listener: &T) { let mut map = self.form_id_listener_map.borrow_mut(); let listener = listener.to_element(); - let mut set = map.entry(Atom::from(id)).or_insert(HashSet::new()); + let set = map.entry(Atom::from(id)).or_insert(HashSet::new()); set.insert(JS::from_ref(listener)); } @@ -1559,7 +1559,7 @@ impl Document { /// https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe pub fn cancel_animation_frame(&self, ident: u32) { let mut list = self.animation_frame_list.borrow_mut(); - if let Some(mut pair) = list.iter_mut().find(|pair| pair.0 == ident) { + if let Some(pair) = list.iter_mut().find(|pair| pair.0 == ident) { pair.1 = None; } } @@ -2391,7 +2391,7 @@ impl Document { if entry.snapshot.is_none() { entry.snapshot = Some(Snapshot::new(el.html_element_in_html_document())); } - let mut snapshot = entry.snapshot.as_mut().unwrap(); + let snapshot = entry.snapshot.as_mut().unwrap(); if snapshot.state.is_none() { snapshot.state = Some(el.state()); } @@ -2418,7 +2418,7 @@ impl Document { entry.hint.insert(RESTYLE_SELF); } - let mut snapshot = entry.snapshot.as_mut().unwrap(); + let snapshot = entry.snapshot.as_mut().unwrap(); if attr.local_name() == &local_name!("id") { snapshot.id_changed = true; } else if attr.local_name() == &local_name!("class") { @@ -4019,7 +4019,7 @@ impl PendingInOrderScriptVec { fn loaded(&self, element: &HTMLScriptElement, result: ScriptResult) { let mut scripts = self.scripts.borrow_mut(); - let mut entry = scripts.iter_mut().find(|entry| &*entry.element == element).unwrap(); + let entry = scripts.iter_mut().find(|entry| &*entry.element == element).unwrap(); entry.loaded(result); } |