From 3dec6edd10ec800de50a04c105a75fb98e0411ca Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Tue, 24 Nov 2015 13:44:59 -0600 Subject: Update string_cache to 0.2. Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom. --- components/script/dom/documentfragment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/script/dom/documentfragment.rs') diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs index 1334bff1da0..471da29be51 100644 --- a/components/script/dom/documentfragment.rs +++ b/components/script/dom/documentfragment.rs @@ -55,9 +55,9 @@ impl DocumentFragmentMethods for DocumentFragment { // https://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid fn GetElementById(&self, id: DOMString) -> Option> { let node = self.upcast::(); - let id = Atom::from_slice(&id); + let id = Atom::from(&*id); node.traverse_preorder().filter_map(Root::downcast::).find(|descendant| { - match descendant.get_attribute(&ns!(""), &atom!(id)) { + match descendant.get_attribute(&ns!(), &atom!("id")) { None => false, Some(attr) => *attr.value().as_atom() == id, } -- cgit v1.2.3