@@ -173,9 +173,9 @@ impl FileDescription for io::Stdout {
173173 dest : & MPlaceTy < ' tcx > ,
174174 ecx : & mut MiriInterpCx < ' tcx > ,
175175 ) -> InterpResult < ' tcx > {
176- let bytes = ecx. read_bytes_ptr_strip_provenance ( ptr, Size :: from_bytes ( len) ) ?. to_owned ( ) ;
176+ let bytes = ecx. read_bytes_ptr_strip_provenance ( ptr, Size :: from_bytes ( len) ) ?;
177177 // We allow writing to stderr even with isolation enabled.
178- let result = Write :: write ( & mut { self } , & bytes) ;
178+ let result = Write :: write ( & mut { self } , bytes) ;
179179 // Stdout is buffered, flush to make sure it appears on the
180180 // screen. This is the write() syscall of the interpreted
181181 // program, we want it to correspond to a write() syscall on
@@ -204,10 +204,10 @@ impl FileDescription for io::Stderr {
204204 dest : & MPlaceTy < ' tcx > ,
205205 ecx : & mut MiriInterpCx < ' tcx > ,
206206 ) -> InterpResult < ' tcx > {
207- let bytes = ecx. read_bytes_ptr_strip_provenance ( ptr, Size :: from_bytes ( len) ) ?. to_owned ( ) ;
207+ let bytes = ecx. read_bytes_ptr_strip_provenance ( ptr, Size :: from_bytes ( len) ) ?;
208208 // We allow writing to stderr even with isolation enabled.
209209 // No need to flush, stderr is not buffered.
210- let result = Write :: write ( & mut { self } , & bytes) ;
210+ let result = Write :: write ( & mut { self } , bytes) ;
211211 ecx. return_written_byte_count_or_error ( result, dest)
212212 }
213213
0 commit comments