@@ -164,7 +164,7 @@ impl FileDescription for io::Stdout {
164
164
ecx : & mut MiriInterpCx < ' tcx > ,
165
165
) -> InterpResult < ' tcx > {
166
166
// We allow writing to stderr even with isolation enabled.
167
- let result = Ok ( Write :: write ( & mut { self } , bytes) ) ;
167
+ let result = Write :: write ( & mut { self } , bytes) ;
168
168
// Stdout is buffered, flush to make sure it appears on the
169
169
// screen. This is the write() syscall of the interpreted
170
170
// program, we want it to correspond to a write() syscall on
@@ -195,7 +195,7 @@ impl FileDescription for io::Stderr {
195
195
) -> InterpResult < ' tcx > {
196
196
// We allow writing to stderr even with isolation enabled.
197
197
// No need to flush, stderr is not buffered.
198
- let result = Ok ( Write :: write ( & mut { self } , bytes) ) ;
198
+ let result = Write :: write ( & mut { self } , bytes) ;
199
199
ecx. write_byte_helper ( result, dest) ?;
200
200
Ok ( ( ) )
201
201
}
@@ -223,7 +223,7 @@ impl FileDescription for NullOutput {
223
223
ecx : & mut MiriInterpCx < ' tcx > ,
224
224
) -> InterpResult < ' tcx > {
225
225
// We just don't write anything, but report to the user that we did.
226
- let result = Ok ( Ok ( bytes. len ( ) ) ) ;
226
+ let result = Ok ( bytes. len ( ) ) ;
227
227
ecx. write_byte_helper ( result, dest) ?;
228
228
Ok ( ( ) )
229
229
}
@@ -680,11 +680,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
680
680
681
681
fn write_byte_helper (
682
682
& mut self ,
683
- result : InterpResult < ' tcx , io:: Result < usize > > ,
683
+ result : io:: Result < usize > ,
684
684
dest : & MPlaceTy < ' tcx > ,
685
685
) -> InterpResult < ' tcx > {
686
686
let this = self . eval_context_mut ( ) ;
687
- let result = this. try_unwrap_io_result ( result? . map ( |c| i64:: try_from ( c) . unwrap ( ) ) ) ?;
687
+ let result = this. try_unwrap_io_result ( result. map ( |c| i64:: try_from ( c) . unwrap ( ) ) ) ?;
688
688
this. write_int ( result, dest) ?;
689
689
Ok ( ( ) )
690
690
}
0 commit comments