Skip to content

Commit 87e5e6d

Browse files
committed
review: rename _module to module
1 parent 1db9948 commit 87e5e6d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/commands/run.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ struct Host {
430430
fn populate_with_wasi(
431431
linker: &mut Linker<Host>,
432432
store: &mut Store<Host>,
433-
_module: Module,
433+
module: Module,
434434
preopen_dirs: Vec<(String, Dir)>,
435435
argv: &[String],
436436
vars: &[(String, String)],
@@ -509,16 +509,20 @@ fn populate_with_wasi(
509509
}
510510
#[cfg(feature = "wasi-threads")]
511511
{
512-
wasmtime_wasi_threads::add_to_linker(linker, store, &_module, |host| {
512+
wasmtime_wasi_threads::add_to_linker(linker, store, &module, |host| {
513513
host.wasi_threads.as_ref().unwrap()
514514
})?;
515515
store.data_mut().wasi_threads = Some(Arc::new(WasiThreadsCtx::new(
516-
_module,
516+
module,
517517
Arc::new(linker.clone()),
518518
)?));
519519
}
520520
}
521521

522+
// Silence the unused warning for `module` as it is only used in the
523+
// conditionally-compiled wasi-threads.
524+
drop(&module);
525+
522526
Ok(())
523527
}
524528

0 commit comments

Comments
 (0)