Skip to content

Commit 0c09e8a

Browse files
committed
chore: fix some warnings in merkle
1 parent b5028ea commit 0c09e8a

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

nomt/src/merkle/mod.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//!
33
//! This splits the work of warming-up and performing the trie update across worker threads.
44
5-
use anyhow::Context;
65
use crossbeam::channel::{self, Receiver, Sender};
76
use page_set::FrozenSharedPageSet;
87
use parking_lot::Mutex;
@@ -14,10 +13,7 @@ use nomt_core::{
1413
};
1514
use seek::Seek;
1615

17-
use std::{
18-
collections::HashMap,
19-
sync::{mpsc::RecvError, Arc},
20-
};
16+
use std::{collections::HashMap, sync::Arc};
2117

2218
use crate::{
2319
io::PagePool,
@@ -248,7 +244,7 @@ impl Updater {
248244

249245
let (worker_tx, worker_rx) = crossbeam_channel::bounded(num_workers);
250246

251-
for (worker_id, write_pass) in worker_passes.into_iter().enumerate() {
247+
for write_pass in worker_passes.into_iter() {
252248
let command = UpdateCommand {
253249
shared: shared.clone(),
254250
write_pass: write_pass.into_envelope(),
@@ -262,7 +258,6 @@ impl Updater {
262258
warm_ups: warm_ups.clone(),
263259
warm_page_set: warm_page_set.clone(),
264260
command,
265-
worker_id,
266261
};
267262
spawn_updater::<H>(&self.worker_tp, params, worker_tx.clone());
268263
}
@@ -490,7 +485,6 @@ fn spawn_updater<H: HashAlgorithm>(
490485
params: worker::UpdateParams,
491486
output_tx: Sender<TaskResult<std::io::Result<WorkerOutput>>>,
492487
) {
493-
let worker_id = params.worker_id;
494488
spawn_task(&worker_tp, || worker::run_update::<H>(params), output_tx);
495489
}
496490

nomt/src/merkle/worker.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ pub(super) struct UpdateParams {
4848
pub warm_ups: Arc<HashMap<KeyPath, Seek>>,
4949
pub warm_page_set: Option<FrozenSharedPageSet>,
5050
pub command: UpdateCommand,
51-
pub worker_id: usize,
5251
}
5352

5453
pub(super) struct WarmUpParams {

0 commit comments

Comments
 (0)