diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs index 08ae6f0b56..21fe4d5085 100644 --- a/lib/runtime/src/instance.rs +++ b/lib/runtime/src/instance.rs @@ -843,7 +843,7 @@ impl InstanceHandle { impl Clone for InstanceHandle { fn clone(&self) -> Self { unsafe { &mut *(self.instance as *mut Instance) }.refcount += 1; - InstanceHandle { + Self { instance: self.instance, } } diff --git a/lib/runtime/src/vmcontext.rs b/lib/runtime/src/vmcontext.rs index b5f2a507e2..2e8c914001 100644 --- a/lib/runtime/src/vmcontext.rs +++ b/lib/runtime/src/vmcontext.rs @@ -409,7 +409,7 @@ mod test_vmshared_signature_index { impl VMSharedSignatureIndex { /// Create a new `VMSharedSignatureIndex`. pub fn new(value: u32) -> Self { - VMSharedSignatureIndex(value) + Self(value) } }