From 90d9982adda58e09d6e549a258c2a807d0af5523 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 15 Feb 2024 18:45:01 +0100 Subject: [PATCH] derive default instead of doing it manually --- src/paragraph/parser/abschnitt.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/paragraph/parser/abschnitt.rs b/src/paragraph/parser/abschnitt.rs index 6b881b9..32bc4a6 100644 --- a/src/paragraph/parser/abschnitt.rs +++ b/src/paragraph/parser/abschnitt.rs @@ -9,19 +9,13 @@ use crate::paragraph::parser::{ }; #[derive(Debug, PartialEq)] +#[derive(Default)] pub(crate) struct Abschnitt { metadata: HashMap, pub(crate) cont: bool, } -impl Default for Abschnitt { - fn default() -> Self { - Self { - metadata: HashMap::new(), - cont: false, - } - } -} + impl Abschnitt { pub(crate) fn parse(n: Node, builder: &mut LawBuilder) -> Abschnitt {