From ad8d5d828e508bd2186e3b6a8ad6f92c6e1baf67 Mon Sep 17 00:00:00 2001 From: philipp Date: Wed, 21 Feb 2024 14:23:23 +0100 Subject: [PATCH] clean with pedantic clippy --- src/paragraph/mod.rs | 2 +- src/paragraph/parser/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/paragraph/mod.rs b/src/paragraph/mod.rs index 8499a7d..9d86e66 100644 --- a/src/paragraph/mod.rs +++ b/src/paragraph/mod.rs @@ -105,7 +105,7 @@ impl Parser { Regex::new("").unwrap(); // Find all matches for tags and iterate over them in reverse to avoid messing up the indices - for cap in ueberschrift_regex.captures_iter(&xml) { + for cap in ueberschrift_regex.captures_iter(xml) { let ueberschrift_content = &cap[1]; // Check if there's an following the diff --git a/src/paragraph/parser/mod.rs b/src/paragraph/parser/mod.rs index 319a0de..2b5a783 100644 --- a/src/paragraph/parser/mod.rs +++ b/src/paragraph/parser/mod.rs @@ -44,7 +44,7 @@ impl<'a> From<&'a Node<'a, 'a>> for Expect<'a> { impl<'a> Expect<'a> { fn tag(&self, value: &str) { assert!( - !(self.node.tag_name().name() != value), + self.node.tag_name().name() == value, "Expected tag '{value}', got {} (tag: {}, content: {:?})", self.node.tag_name().name(), self.node.tag_name().name(),