Skip to content

Commit

Permalink
more refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer committed Jan 16, 2025
1 parent 2f14efb commit 7dbf367
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
39 changes: 18 additions & 21 deletions grovedb/src/element/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
//! Helpers
//! Implements helper functions in Element
#[cfg(feature = "minimal")]
use grovedb_merk::tree::kv::{
ValueDefinedCostType,
ValueDefinedCostType::{LayeredValueDefinedCost, SpecializedValueDefinedCost},
};
#[cfg(feature = "minimal")]
use grovedb_merk::tree_type::TreeType;
#[cfg(any(feature = "minimal", feature = "verify"))]
use grovedb_merk::tree_type::{MaybeTree, TreeType};
#[cfg(feature = "minimal")]
use grovedb_merk::{
merk::NodeType,
MaybeTree,
TreeFeatureType::{BigSummedMerkNode, CountedMerkNode, CountedSummedMerkNode},
};
#[cfg(feature = "minimal")]
use grovedb_merk::{
tree::{kv::KV, TreeNode},
tree::{
kv::{
ValueDefinedCostType,
ValueDefinedCostType::{LayeredValueDefinedCost, SpecializedValueDefinedCost},
KV,
},
TreeNode,
},
TreeFeatureType,
TreeFeatureType::{BasicMerkNode, SummedMerkNode},
TreeFeatureType::{
BasicMerkNode, BigSummedMerkNode, CountedMerkNode, CountedSummedMerkNode, SummedMerkNode,
},
};
#[cfg(feature = "minimal")]
use grovedb_version::{check_grovedb_v0, error::GroveVersionError, version::GroveVersion};
#[cfg(feature = "minimal")]
use integer_encoding::VarInt;

#[cfg(feature = "minimal")]
use crate::element::{BIG_SUM_TREE_COST_SIZE, COUNT_SUM_TREE_COST_SIZE, COUNT_TREE_COST_SIZE};
use crate::element::{
BIG_SUM_TREE_COST_SIZE, COUNT_SUM_TREE_COST_SIZE, COUNT_TREE_COST_SIZE, SUM_ITEM_COST_SIZE,
SUM_TREE_COST_SIZE, TREE_COST_SIZE,
};
#[cfg(feature = "minimal")]
use crate::reference_path::path_from_reference_path_type;
#[cfg(any(feature = "minimal", feature = "verify"))]
use crate::reference_path::ReferencePathType;
#[cfg(feature = "minimal")]
use crate::{
element::{SUM_ITEM_COST_SIZE, SUM_TREE_COST_SIZE, TREE_COST_SIZE},
ElementFlags,
};
#[cfg(any(feature = "minimal", feature = "verify"))]
use crate::{Element, Error};
use crate::{Element, ElementFlags, Error};

impl Element {
#[cfg(any(feature = "minimal", feature = "verify"))]
Expand Down
4 changes: 2 additions & 2 deletions grovedb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ use std::{collections::HashMap, option::Option::None, path::Path};
use debugger::start_visualizer;
#[cfg(any(feature = "minimal", feature = "verify"))]
pub use element::Element;
#[cfg(feature = "minimal")]
#[cfg(any(feature = "minimal", feature = "verify"))]
pub use element::ElementFlags;
#[cfg(feature = "minimal")]
use grovedb_costs::{
Expand All @@ -180,7 +180,7 @@ pub use grovedb_merk::proofs::query::query_item::QueryItem;
pub use grovedb_merk::proofs::Query;
#[cfg(feature = "minimal")]
use grovedb_merk::tree::kv::ValueDefinedCostType;
#[cfg(any(feature = "minimal", feature = "verify"))]
#[cfg(feature = "minimal")]
pub use grovedb_merk::tree::AggregateData;
#[cfg(any(feature = "minimal", feature = "verify"))]
pub use grovedb_merk::tree_type::{MaybeTree, TreeType};
Expand Down

0 comments on commit 7dbf367

Please sign in to comment.