From 621f3d3b7d870bbdce89fb8582c5bde94d757910 Mon Sep 17 00:00:00 2001 From: stringhandler Date: Tue, 17 Dec 2024 14:34:24 +0200 Subject: [PATCH] clippy --- src/sharechain/lmdb_block_storage.rs | 2 ++ src/sharechain/p2chain.rs | 6 +++++- src/sharechain/p2chain_level.rs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sharechain/lmdb_block_storage.rs b/src/sharechain/lmdb_block_storage.rs index 210ddba..f586196 100644 --- a/src/sharechain/lmdb_block_storage.rs +++ b/src/sharechain/lmdb_block_storage.rs @@ -113,6 +113,8 @@ pub trait BlockCache { #[cfg(test)] pub mod test { + use std::collections::HashMap; + use super::*; pub(crate) struct InMemoryBlockCache { diff --git a/src/sharechain/p2chain.rs b/src/sharechain/p2chain.rs index e549421..a0d6f6d 100644 --- a/src/sharechain/p2chain.rs +++ b/src/sharechain/p2chain.rs @@ -662,7 +662,11 @@ mod test { use tari_utilities::epoch_time::EpochTime; use super::*; - use crate::sharechain::{in_memory::test::new_random_address, p2block::P2BlockBuilder}; + use crate::sharechain::{ + in_memory::test::new_random_address, + lmdb_block_storage::LmdbBlockStorage, + p2block::P2BlockBuilder, + }; #[test] fn test_only_keeps_size() { diff --git a/src/sharechain/p2chain_level.rs b/src/sharechain/p2chain_level.rs index fa9879e..7e31dc5 100644 --- a/src/sharechain/p2chain_level.rs +++ b/src/sharechain/p2chain_level.rs @@ -121,7 +121,7 @@ mod test { .with_miner_wallet_address(address.clone()) .build() .unwrap(); - let mut chain_level = P2ChainLevel::new(block.clone(), Arc::new(InMemoryBlockCache::new())); + let chain_level = P2ChainLevel::new(block.clone(), Arc::new(InMemoryBlockCache::new())); chain_level.set_chain_block(block.generate_hash()); assert_eq!(