Make use of From<String> for Atom

This commit is contained in:
Anthony Ramine 2016-02-24 17:09:49 +01:00
parent 50af73d1a2
commit cc030df36e
7 changed files with 14 additions and 14 deletions

View file

@ -406,7 +406,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
unsafe {
let mut length: u32 = 0;
let p = Gecko_LocalName(self.element, &mut length);
Atom::from(&*String::from_utf16(slice::from_raw_parts(p, length as usize)).unwrap())
Atom::from(String::from_utf16(slice::from_raw_parts(p, length as usize)).unwrap())
}
*/
}
@ -417,7 +417,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
unsafe {
let mut length: u32 = 0;
let p = Gecko_Namespace(self.element, &mut length);
Namespace(Atom::from(&*String::from_utf16(slice::from_raw_parts(p, length as usize)).unwrap()))
Namespace(Atom::from(String::from_utf16(slice::from_raw_parts(p, length as usize)).unwrap()))
}
*/
}