File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ struct Host {
430430fn 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
You can’t perform that action at this time.
0 commit comments