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) {
4848 let snapshot = sbox. snapshot ( ) . unwrap ( ) ;
4949
5050 b. iter ( || {
51- sbox
52- . call :: < String > ( "Echo" , "hello\n " . to_string ( ) )
53- . unwrap ( ) ;
51+ sbox. call :: < String > ( "Echo" , "hello\n " . to_string ( ) ) . unwrap ( ) ;
5452 sbox. restore ( & snapshot) . unwrap ( ) ;
5553 } ) ;
5654 } ) ;
Original file line number Diff line number Diff line change @@ -263,7 +263,6 @@ where
263263 SharedMemorySnapshot :: new ( & mut self . shared_mem , self . mapped_rgns )
264264 }
265265
266-
267266 /// This function restores a memory snapshot the given snapshot.
268267 ///
269268 /// 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 {
102102 /// Restore the sandbox's memory to the state captured in the given snapshot.
103103 #[ instrument( err( Debug ) , skip_all, parent = Span :: current( ) ) ]
104104 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
106107 . unwrap_mgr_mut ( )
107108 . restore_snapshot ( & snapshot. inner ) ?;
108109 unsafe { self . vm . unmap_regions ( rgns_to_unmap) ? } ;
You can’t perform that action at this time.
0 commit comments