mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make Attr::prefix return an Option<&Prefix>
This commit is contained in:
parent
a377caa7e9
commit
fb206e2b10
3 changed files with 7 additions and 7 deletions
|
@ -1768,7 +1768,7 @@ impl Node {
|
|||
attr.value().clone(),
|
||||
attr.name().clone(),
|
||||
attr.namespace().clone(),
|
||||
attr.prefix().clone());
|
||||
attr.prefix().cloned());
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
|
@ -1815,10 +1815,10 @@ impl Node {
|
|||
defined_prefix: &Option<LocalName>) -> bool {
|
||||
*attr.namespace() == ns!(xmlns) &&
|
||||
match (attr.prefix(), defined_prefix) {
|
||||
(&Some(ref attr_prefix), &Some(ref defined_prefix)) =>
|
||||
(Some(attr_prefix), &Some(ref defined_prefix)) =>
|
||||
attr_prefix == &namespace_prefix!("xmlns") &&
|
||||
attr.local_name() == defined_prefix,
|
||||
(&None, &None) => *attr.local_name() == local_name!("xmlns"),
|
||||
(None, &None) => *attr.local_name() == local_name!("xmlns"),
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue