Inline single-use method compare_parser_and_def_default_namespaces()

This commit is contained in:
Dirkjan Ochtman 2022-09-04 15:39:06 +02:00
parent 31c9ce5873
commit f33d2e4524
1 changed files with 1 additions and 5 deletions

View File

@ -51,10 +51,6 @@ impl<'xml> Deserializer<'xml> {
}
}
pub fn compare_parser_and_def_default_namespaces(&self) -> bool {
self.parser_default_namespace == self.def_default_namespace
}
pub fn peek_next_attribute(&self) -> Option<&(&'xml str, &'xml str)> {
self.tag_attributes.last()
}
@ -105,7 +101,7 @@ impl<'xml> Deserializer<'xml> {
}
// Compare parser namespace with defined one
if !self.compare_parser_and_def_default_namespaces() {
if self.parser_default_namespace != self.def_default_namespace {
return Err(Error::WrongNamespace);
}