File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,7 @@ fn guest_call_benchmark(c: &mut Criterion) {
48
48
let snapshot = sbox. snapshot ( ) . unwrap ( ) ;
49
49
50
50
b. iter ( || {
51
- sbox
52
- . call :: < String > ( "Echo" , "hello\n " . to_string ( ) )
53
- . unwrap ( ) ;
51
+ sbox. call :: < String > ( "Echo" , "hello\n " . to_string ( ) ) . unwrap ( ) ;
54
52
sbox. restore ( & snapshot) . unwrap ( ) ;
55
53
} ) ;
56
54
} ) ;
Original file line number Diff line number Diff line change @@ -263,7 +263,6 @@ where
263
263
SharedMemorySnapshot :: new ( & mut self . shared_mem , self . mapped_rgns )
264
264
}
265
265
266
-
267
266
/// This function restores a memory snapshot the given snapshot.
268
267
///
269
268
/// Returns the number of memory regions mapped into the sandbox
Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ impl MultiUseSandbox {
102
102
/// Restore the sandbox's memory to the state captured in the given snapshot.
103
103
#[ instrument( err( Debug ) , skip_all, parent = Span :: current( ) ) ]
104
104
pub fn restore ( & mut self , snapshot : & Snapshot ) -> Result < ( ) > {
105
- let rgns_to_unmap = self . mem_mgr
105
+ let rgns_to_unmap = self
106
+ . mem_mgr
106
107
. unwrap_mgr_mut ( )
107
108
. restore_snapshot ( & snapshot. inner ) ?;
108
109
unsafe { self . vm . unmap_regions ( rgns_to_unmap) ? } ;
You can’t perform that action at this time.
0 commit comments