Skip to content

Commit

Permalink
InstancePre can derive Clone
Browse files Browse the repository at this point in the history
The clone should be reasonably inexpensive: Clone for Module is just an
Arc, and Clone for Definition should also just be an Arc on the HostFunc
or Instance variants. An InstancePre shouldnt contain any
Definition::Extern variants because there is not yet a Store associated
with it- right?
  • Loading branch information
Pat Hickey committed Nov 6, 2021
1 parent 6bcee7f commit cb6bcc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/wasmtime/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ impl<'a> ImportsBuilder<'a> {
///
/// [`Store`]: crate::Store
/// [`Linker::instantiate_pre`]: crate::Linker::instantiate_pre
#[derive(Clone)]
pub struct InstancePre<T> {
module: Module,
items: Vec<Definition>,
Expand Down

0 comments on commit cb6bcc9

Please sign in to comment.