mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
clippy: rm some type_complexity (#9276)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -30,6 +30,12 @@ use reth_tracing::{RethTracer, Tracer};
|
||||
use schnellru::{ByLength, LruMap};
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
/// Type alias for the LRU cache used within the [`PrecompileCache`].
|
||||
type PrecompileLRUCache = LruMap<(Bytes, u64), PrecompileResult>;
|
||||
|
||||
/// Type alias for the thread-safe `Arc<RwLock<_>>` wrapper around [`PrecompileCache`].
|
||||
type CachedPrecompileResult = Arc<RwLock<PrecompileLRUCache>>;
|
||||
|
||||
/// A cache for precompile inputs / outputs.
|
||||
///
|
||||
/// This assumes that the precompile is a standard precompile, as in `StandardPrecompileFn`, meaning
|
||||
@ -40,8 +46,7 @@ use std::{collections::HashMap, sync::Arc};
|
||||
#[derive(Debug, Default)]
|
||||
pub struct PrecompileCache {
|
||||
/// Caches for each precompile input / output.
|
||||
#[allow(clippy::type_complexity)]
|
||||
cache: HashMap<(Address, SpecId), Arc<RwLock<LruMap<(Bytes, u64), PrecompileResult>>>>,
|
||||
cache: HashMap<(Address, SpecId), CachedPrecompileResult>,
|
||||
}
|
||||
|
||||
/// Custom EVM configuration
|
||||
|
||||
Reference in New Issue
Block a user