From 4447677f2c7cf84b2b53f0a059e04a5870803711 Mon Sep 17 00:00:00 2001 From: Davidson Souza Date: Mon, 14 Aug 2023 13:49:54 -0300 Subject: [PATCH] Remove #[derive(Default)] for enum Default Derive macro for enums isn't supported in MSRV. Impl it manually --- src/accumulator/node_hash.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/accumulator/node_hash.rs b/src/accumulator/node_hash.rs index 74ebedd..aecdec0 100644 --- a/src/accumulator/node_hash.rs +++ b/src/accumulator/node_hash.rs @@ -57,14 +57,17 @@ use serde::{Deserialize, Serialize}; /// let hash = NodeHash::new([0; 32]); /// assert_eq!(hash.to_string().as_str(), "0000000000000000000000000000000000000000000000000000000000000000"); /// ``` -#[derive(Default)] pub enum NodeHash { - #[default] Empty, Placeholder, Some([u8; 32]), } +impl Default for NodeHash { + fn default() -> Self { + NodeHash::Empty + } +} impl Deref for NodeHash { type Target = [u8; 32];