File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 105
105
//! [`Read`]: ../io/trait.Read.html
106
106
107
107
#![ stable( feature = "process" , since = "1.0.0" ) ]
108
+ #![ deny( unsafe_op_in_unsafe_fn) ]
108
109
109
110
use crate :: io:: prelude:: * ;
110
111
@@ -311,7 +312,8 @@ impl Read for ChildStdout {
311
312
312
313
#[ inline]
313
314
unsafe fn initializer ( & self ) -> Initializer {
314
- Initializer :: nop ( )
315
+ // SAFETY: Read is guaranteed to work on uninitialized memory
316
+ unsafe { Initializer :: nop ( ) }
315
317
}
316
318
}
317
319
@@ -372,7 +374,8 @@ impl Read for ChildStderr {
372
374
373
375
#[ inline]
374
376
unsafe fn initializer ( & self ) -> Initializer {
375
- Initializer :: nop ( )
377
+ // SAFETY: Read is guaranteed to work on uninitialized memory
378
+ unsafe { Initializer :: nop ( ) }
376
379
}
377
380
}
378
381
You can’t perform that action at this time.
0 commit comments