wip-remove-compare-ns

This commit is contained in:
Dirkjan Ochtman 2022-09-05 13:40:57 +02:00
parent c91907d777
commit 2a8d729a3e
1 changed files with 0 additions and 18 deletions

View File

@ -71,24 +71,6 @@ impl<'xml> Deserializer<'xml> {
})
}
// Check if defined and gotten namespaces equals for each field
pub fn compare_namespace(
&self,
expected: &Option<&str>,
actual: Option<&str>,
) -> Result<(), Error> {
match (expected, actual) {
(Some(expected), Some(actual)) => {
match self.parser_namespaces.get(expected) == self.def_namespaces.get(actual) {
true => Ok(()),
false => Err(Error::WrongNamespace),
}
}
(Some(_), None) | (None, Some(_)) => Err(Error::WrongNamespace),
(None, None) => Ok(()),
}
}
pub fn peek_next_attribute(&self) -> Result<Option<AttributeNode<'xml>>, Error> {
let attr = match self.tag_attributes.last() {
Some(attr) => attr,