@@ -15,7 +15,7 @@ mod store;
15
15
pub mod wasi_2023_10_18;
16
16
pub mod wasi_2023_11_10;
17
17
18
- use std:: { path:: PathBuf , sync :: Arc , time:: Duration } ;
18
+ use std:: { path:: PathBuf , time:: Duration } ;
19
19
20
20
use anyhow:: Result ;
21
21
use crossbeam_channel:: Sender ;
@@ -395,14 +395,14 @@ impl<T: OutboundWasiHttpHandler + Send + Sync> Engine<T> {
395
395
/// Creates a new [`InstancePre`] for the given [`Component`].
396
396
#[ instrument( skip_all) ]
397
397
pub fn instantiate_pre ( & self , component : & Component ) -> Result < InstancePre < T > > {
398
- let inner = Arc :: new ( self . linker . instantiate_pre ( component) ?) ;
398
+ let inner = self . linker . instantiate_pre ( component) ?;
399
399
Ok ( InstancePre { inner } )
400
400
}
401
401
402
402
/// Creates a new [`ModuleInstancePre`] for the given [`Module`].
403
403
#[ instrument( skip_all) ]
404
404
pub fn module_instantiate_pre ( & self , module : & Module ) -> Result < ModuleInstancePre < T > > {
405
- let inner = Arc :: new ( self . module_linker . instantiate_pre ( module) ?) ;
405
+ let inner = self . module_linker . instantiate_pre ( module) ?;
406
406
Ok ( ModuleInstancePre { inner } )
407
407
}
408
408
@@ -424,7 +424,7 @@ impl<T> AsRef<wasmtime::Engine> for Engine<T> {
424
424
///
425
425
/// See [`wasmtime::component::InstancePre`] for more information.
426
426
pub struct InstancePre < T > {
427
- inner : Arc < wasmtime:: component:: InstancePre < Data < T > > > ,
427
+ inner : wasmtime:: component:: InstancePre < Data < T > > ,
428
428
}
429
429
430
430
impl < T : Send + Sync > InstancePre < T > {
@@ -453,7 +453,7 @@ impl<T> AsRef<wasmtime::component::InstancePre<Data<T>>> for InstancePre<T> {
453
453
///
454
454
/// See [`wasmtime::InstancePre`] for more information.
455
455
pub struct ModuleInstancePre < T > {
456
- inner : Arc < wasmtime:: InstancePre < Data < T > > > ,
456
+ inner : wasmtime:: InstancePre < Data < T > > ,
457
457
}
458
458
459
459
impl < T : Send + Sync > ModuleInstancePre < T > {
0 commit comments