diff --git a/bin/host/src/kv/mem.rs b/bin/host/src/kv/mem.rs index 7a1f45548..7b26052e4 100644 --- a/bin/host/src/kv/mem.rs +++ b/bin/host/src/kv/mem.rs @@ -16,7 +16,7 @@ pub struct MemoryKeyValueStore { impl MemoryKeyValueStore { /// Create a new [MemoryKeyValueStore] with an empty store. pub fn new() -> Self { - Self { store: HashMap::new() } + Self { store: HashMap::default() } } } diff --git a/crates/derive/src/stages/channel/channel_bank.rs b/crates/derive/src/stages/channel/channel_bank.rs index ded3a6b9d..f50c8762d 100644 --- a/crates/derive/src/stages/channel/channel_bank.rs +++ b/crates/derive/src/stages/channel/channel_bank.rs @@ -53,7 +53,7 @@ where /// Create a new [ChannelBank] stage. pub fn new(cfg: Arc, prev: P) -> Self { crate::set!(STAGE_RESETS, 0, &["channel-bank"]); - Self { cfg, channels: HashMap::new(), channel_queue: VecDeque::new(), prev } + Self { cfg, channels: HashMap::default(), channel_queue: VecDeque::new(), prev } } /// Returns the size of the channel bank by accumulating over all channels. diff --git a/crates/preimage/src/oracle.rs b/crates/preimage/src/oracle.rs index 174dac6fb..6ea79a214 100644 --- a/crates/preimage/src/oracle.rs +++ b/crates/preimage/src/oracle.rs @@ -160,7 +160,7 @@ mod test { PreimageKey::new(*keccak256(MOCK_DATA_B), PreimageKeyType::Keccak256); let preimages = { - let mut preimages = HashMap::new(); + let mut preimages = HashMap::default(); preimages.insert(key_a, MOCK_DATA_A.to_vec()); preimages.insert(key_b, MOCK_DATA_B.to_vec()); Arc::new(Mutex::new(preimages)) @@ -212,7 +212,7 @@ mod test { PreimageKey::new(*keccak256(MOCK_DATA_B), PreimageKeyType::Keccak256); let preimages = { - let mut preimages = HashMap::new(); + let mut preimages = HashMap::default(); preimages.insert(key_a, MOCK_DATA_A.to_vec()); preimages.insert(key_b, MOCK_DATA_B.to_vec()); Arc::new(Mutex::new(preimages))