From 955fd5b0ae5b9d13c6e77a51fa63483b1061698b Mon Sep 17 00:00:00 2001 From: mos Date: Tue, 30 Jul 2024 14:37:23 +0200 Subject: [PATCH] short-hand default via derive --- bip/src/bp.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bip/src/bp.rs b/bip/src/bp.rs index 48cb464..b86be8b 100644 --- a/bip/src/bp.rs +++ b/bip/src/bp.rs @@ -78,17 +78,12 @@ impl Op { } } +#[derive(Default)] pub struct Writer { data: HashMap>, buf: Vec, } -impl Default for Writer { - fn default() -> Self { - Self::new() - } -} - impl Writer { pub fn new() -> Self { Self {