Make Element::prefix return an Option<&DOMString>

This commit is contained in:
Anthony Ramine 2016-11-30 13:45:10 +01:00
parent 2fcb908daa
commit a377caa7e9
4 changed files with 10 additions and 10 deletions

View file

@ -114,7 +114,7 @@ impl<'a> TreeSink for Sink {
let elem = target.downcast::<Element>()
.expect("tried to get name of non-Element in XML parsing");
QName {
prefix: elem.prefix().as_ref().map_or(namespace_prefix!(""), |p| Prefix::from(&**p)),
prefix: elem.prefix().map_or(namespace_prefix!(""), |p| Prefix::from(&**p)),
namespace_url: elem.namespace().clone(),
local: elem.local_name().clone(),
}