@@ -173,9 +173,9 @@ impl FileDescription for io::Stdout {
173
173
dest : & MPlaceTy < ' tcx > ,
174
174
ecx : & mut MiriInterpCx < ' tcx > ,
175
175
) -> 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) ) ?;
177
177
// 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) ;
179
179
// Stdout is buffered, flush to make sure it appears on the
180
180
// screen. This is the write() syscall of the interpreted
181
181
// program, we want it to correspond to a write() syscall on
@@ -204,10 +204,10 @@ impl FileDescription for io::Stderr {
204
204
dest : & MPlaceTy < ' tcx > ,
205
205
ecx : & mut MiriInterpCx < ' tcx > ,
206
206
) -> 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) ) ?;
208
208
// We allow writing to stderr even with isolation enabled.
209
209
// No need to flush, stderr is not buffered.
210
- let result = Write :: write ( & mut { self } , & bytes) ;
210
+ let result = Write :: write ( & mut { self } , bytes) ;
211
211
ecx. return_written_byte_count_or_error ( result, dest)
212
212
}
213
213
0 commit comments