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

@ -536,7 +536,7 @@ impl Document {
// Step 3 & 4
String::from_utf8(percent_decode(fragid.as_bytes())).ok()
// Step 5
.and_then(|decoded_fragid| self.get_element_by_id(&Atom::from(&*decoded_fragid)))
.and_then(|decoded_fragid| self.get_element_by_id(&Atom::from(decoded_fragid)))
// Step 6
.or_else(|| self.get_anchor_by_name(fragid))
// Step 7