@@ -107,7 +107,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
107107 fh. low
108108 } ) ;
109109
110- this. set_last_error_from_io_result ( fd)
110+ this. try_unwrap_io_result ( fd)
111111 }
112112
113113 fn fcntl (
@@ -143,7 +143,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
143143 let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
144144
145145 this. remove_handle_and ( fd, |handle, this| {
146- this. set_last_error_from_io_result ( handle. file . sync_all ( ) . map ( |_| 0i32 ) )
146+ this. try_unwrap_io_result ( handle. file . sync_all ( ) . map ( |_| 0i32 ) )
147147 } )
148148 }
149149
@@ -176,7 +176,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
176176 } ) ;
177177 // Reinsert the file handle
178178 this. machine . file_handler . handles . insert ( fd, handle) ;
179- this. set_last_error_from_io_result ( bytes?. map ( |bytes| bytes as i64 ) )
179+ this. try_unwrap_io_result ( bytes?. map ( |bytes| bytes as i64 ) )
180180 } )
181181 }
182182
@@ -205,7 +205,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
205205 . map ( |bytes| handle. file . write ( bytes) . map ( |bytes| bytes as i64 ) )
206206 } ) ;
207207 this. machine . file_handler . handles . insert ( fd, handle) ;
208- this. set_last_error_from_io_result ( bytes?)
208+ this. try_unwrap_io_result ( bytes?)
209209 } )
210210 }
211211
@@ -222,7 +222,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
222222
223223 let result = remove_file ( path) . map ( |_| 0 ) ;
224224
225- this. set_last_error_from_io_result ( result)
225+ this. try_unwrap_io_result ( result)
226226 }
227227
228228 /// Helper function that gets a `FileHandle` immutable reference and allows to manipulate it
0 commit comments