We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a372ce3 commit 5c60abfCopy full SHA for 5c60abf
1 file changed
bindings/rust/evmc-client/src/lib.rs
@@ -17,6 +17,13 @@ pub struct EvmcVm {
17
host_interface: *mut ffi::evmc_host_interface,
18
}
19
20
+impl Drop for EvmcVm {
21
+ fn drop(&mut self) {
22
+ debug_assert!(!self.handle.is_null());
23
+ unsafe { ((*self.handle).destroy.unwrap())(self.handle) }
24
+ }
25
+}
26
+
27
impl EvmcVm {
28
pub fn get_abi_version(&self) -> i32 {
29
unsafe {
@@ -39,10 +46,6 @@ impl EvmcVm {
39
46
40
47
41
48
42
- pub fn destroy(&self) {
43
- unsafe { ((*self.handle).destroy.unwrap())(self.handle) }
44
- }
45
-
49
pub fn execute(
50
&self,
51
ctx: &mut dyn host::HostContext,
0 commit comments