From 6e0b105b8b57300a69476876c13640846b468a6e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 4 Sep 2022 15:39:06 +0200 Subject: [PATCH] Inline single-use method compare_parser_and_def_default_namespaces() --- instant-xml/src/de.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/instant-xml/src/de.rs b/instant-xml/src/de.rs index 927df06..5ee7660 100644 --- a/instant-xml/src/de.rs +++ b/instant-xml/src/de.rs @@ -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); }