@@ -164,7 +164,7 @@ impl FileDescription for io::Stdout {
164164 ecx : & mut MiriInterpCx < ' tcx > ,
165165 ) -> InterpResult < ' tcx > {
166166 // 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) ;
168168 // Stdout is buffered, flush to make sure it appears on the
169169 // screen. This is the write() syscall of the interpreted
170170 // program, we want it to correspond to a write() syscall on
@@ -195,7 +195,7 @@ impl FileDescription for io::Stderr {
195195 ) -> InterpResult < ' tcx > {
196196 // We allow writing to stderr even with isolation enabled.
197197 // 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) ;
199199 ecx. write_byte_helper ( result, dest) ?;
200200 Ok ( ( ) )
201201 }
@@ -223,7 +223,7 @@ impl FileDescription for NullOutput {
223223 ecx : & mut MiriInterpCx < ' tcx > ,
224224 ) -> InterpResult < ' tcx > {
225225 // 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 ( ) ) ;
227227 ecx. write_byte_helper ( result, dest) ?;
228228 Ok ( ( ) )
229229 }
@@ -680,11 +680,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
680680
681681 fn write_byte_helper (
682682 & mut self ,
683- result : InterpResult < ' tcx , io:: Result < usize > > ,
683+ result : io:: Result < usize > ,
684684 dest : & MPlaceTy < ' tcx > ,
685685 ) -> InterpResult < ' tcx > {
686686 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 ( ) ) ) ?;
688688 this. write_int ( result, dest) ?;
689689 Ok ( ( ) )
690690 }
0 commit comments