Skip to content

Commit 517de29

Browse files
committed
review: rename _module to module
1 parent 7fb684a commit 517de29

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
@@ -431,7 +431,7 @@ struct Host {
431431
fn populate_with_wasi(
432432
host: &mut Host,
433433
linker: &mut Linker<Host>,
434-
_module: Module,
434+
module: Module,
435435
preopen_dirs: Vec<(String, Dir)>,
436436
argv: &[String],
437437
vars: &[(String, String)],
@@ -510,16 +510,20 @@ fn populate_with_wasi(
510510
}
511511
#[cfg(feature = "wasi-threads")]
512512
{
513-
wasmtime_wasi_threads::add_to_linker(linker, &_module, |host| {
513+
wasmtime_wasi_threads::add_to_linker(linker, &module, |host| {
514514
host.wasi_threads.as_ref().unwrap()
515515
})?;
516516
host.wasi_threads = Some(Arc::new(WasiThreadsCtx::new(
517-
_module,
517+
module,
518518
Arc::new(linker.clone()),
519519
)?));
520520
}
521521
}
522522

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

0 commit comments

Comments
 (0)