From 9a7dc4b405e6e89e289e6d36fd040735865f2592 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 12 Jan 2024 10:46:46 +1000 Subject: [PATCH] rustc lint: Remove or ignore some dead code (#8148) --- zebra-chain/src/orchard/note.rs | 7 ++++++- zebra-chain/src/sprout/tree.rs | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/zebra-chain/src/orchard/note.rs b/zebra-chain/src/orchard/note.rs index 8d46220ff..822584912 100644 --- a/zebra-chain/src/orchard/note.rs +++ b/zebra-chain/src/orchard/note.rs @@ -20,8 +20,13 @@ pub use nullifiers::Nullifier; #[cfg(any(test, feature = "proptest-impl"))] mod arbitrary; -#[derive(Clone, Copy, Debug)] /// A random seed (rseed) used in the Orchard note creation. +#[derive(Clone, Copy, Debug)] +// At the moment this field is never read. +// +// TODO: consider replacing this code with the equivalent `orchard` crate code, +// which is better tested. +#[allow(dead_code)] pub struct SeedRandomness(pub(crate) [u8; 32]); impl SeedRandomness { diff --git a/zebra-chain/src/sprout/tree.rs b/zebra-chain/src/sprout/tree.rs index 3807e2fa3..c5ad74a7d 100644 --- a/zebra-chain/src/sprout/tree.rs +++ b/zebra-chain/src/sprout/tree.rs @@ -83,12 +83,6 @@ lazy_static! { }; } -/// The index of a note's commitment at the leafmost layer of its Note -/// Commitment Tree. -/// -/// -pub struct Position(pub(crate) u64); - /// Sprout note commitment tree root node hash. /// /// The root hash in LEBS2OSP256(rt) encoding of the Sprout note