From 949fd7f48628b8c45f08dd3a00ca21f36cdc74a6 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 15 Feb 2024 15:31:40 +0100 Subject: [PATCH] clippy --- src/law/responsible.rs | 2 +- src/paragraph/parser.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/law/responsible.rs b/src/law/responsible.rs index e0fa480..bf33702 100644 --- a/src/law/responsible.rs +++ b/src/law/responsible.rs @@ -63,7 +63,7 @@ pub fn starts_with_letter(_classifier_name: &str, instance_name: &str) -> bool { pub fn starts_with_uppercaseletter(_classifier_name: &str, instance_name: &str) -> bool { instance_name.starts_with(|c: char| c.is_ascii_uppercase()) - && instance_name.chars().nth(0) != Some('I') + && !instance_name.starts_with('I') && (instance_name.chars().nth(1) == Some('.') || instance_name.chars().nth(1) == Some(')')) } diff --git a/src/paragraph/parser.rs b/src/paragraph/parser.rs index 8cc8eac..f6c08e6 100644 --- a/src/paragraph/parser.rs +++ b/src/paragraph/parser.rs @@ -95,8 +95,6 @@ impl Abschnitt { while let Some(child) = &c.peek() { if Ueberschrift::test_with_typ_and_content(child, "titel", "Beachte") { c.next(); - //Zu Abs. 2: zum Bezugszeitraum vgl. ยง 33 Abs. 13 - let absatz = Absatz::parse( c.next() .expect("After a 'Beachte' title, we need an Absatz"),