Skip to content

Commit

Permalink
Merge pull request #38 from Davidson-Souza/remove-derive-default
Browse files Browse the repository at this point in the history
Remove #[derive(Default)] for enum
  • Loading branch information
Davidson-Souza authored Aug 14, 2023
2 parents 36461fe + 4447677 commit d2ab91f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/accumulator/node_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit d2ab91f

Please sign in to comment.