diff --git a/src/lib.rs b/src/lib.rs index 2cd77ed1..4fd80ff3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ //#![warn(missing_doc)] #![forbid(non_camel_case_types)] -#![feature(macro_rules, struct_variant)] +#![feature(macro_rules, struct_variant, tuple_indexing)] //! This crate currently provides almost XML 1.0/1.1-compliant pull parser. diff --git a/src/namespace.rs b/src/namespace.rs index 3396233d..f76fc7c8 100644 --- a/src/namespace.rs +++ b/src/namespace.rs @@ -41,9 +41,9 @@ impl Namespace { let Namespace(ref hm) = *self; for (k, v) in hm.iter() { match (k.as_ref().map(|k| k.as_slice()), v.as_slice()) { - (None, NS_EMPTY_URI) | - (Some(NS_XMLNS_PREFIX), NS_XMLNS_URI) | - (Some(NS_XML_PREFIX), NS_XML_URI) => {}, + (None, u) if u == NS_EMPTY_URI => {}, + (Some(p), u) if p == NS_XMLNS_PREFIX && u == NS_XMLNS_URI => {}, + (Some(p), u) if p == NS_XML_PREFIX && u == NS_XML_URI => {}, _ => return false } }