From 10b0ddf49d9aabbf37a5139da3ae98e2ef2c6cdd Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 16 Jun 2025 16:37:43 +0200 Subject: Move struct in proper crate --- src/node.rs | 9 +++++++++ src/proof.rs | 14 ++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/node.rs b/src/node.rs index 90481d0..e7e6b0f 100644 --- a/src/node.rs +++ b/src/node.rs @@ -1,5 +1,14 @@ //! Contains node definitions for Merkle trees, including leaf and internal node structures. +/// Enum representing the type of the node child. +#[derive(Debug, Clone)] +pub enum NodeChildType { + /// Left child + Left, + /// Right child + Right, +} + /// Enum representing the type of a Merkle tree node. #[derive(Clone)] pub enum NodeStatus { diff --git a/src/proof.rs b/src/proof.rs index 10eb825..cfc7a0b 100644 --- a/src/proof.rs +++ b/src/proof.rs @@ -1,15 +1,9 @@ //! Merkle tree proof and verification implementation -use crate::{hasher::Hasher, node::Node}; - -/// Enum representing the type of the node child. -#[derive(Debug, Clone)] -pub enum NodeChildType { - /// Left child - Left, - /// Right child - Right, -} +use crate::{ + hasher::Hasher, + node::{Node, NodeChildType}, +}; /// Represents a single step in a Merkle proof path. #[derive(Debug, Clone)] -- cgit v1.2.3-71-g8e6c