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 105105//! [`Read`]: ../io/trait.Read.html
106106
107107#![ stable( feature = "process" , since = "1.0.0" ) ]
108+ #![ deny( unsafe_op_in_unsafe_fn) ]
108109
109110use crate :: io:: prelude:: * ;
110111
@@ -311,7 +312,8 @@ impl Read for ChildStdout {
311312
312313 #[ inline]
313314 unsafe fn initializer ( & self ) -> Initializer {
314- Initializer :: nop ( )
315+ // SAFETY: Read is guaranteed to work on uninitialized memory
316+ unsafe { Initializer :: nop ( ) }
315317 }
316318}
317319
@@ -372,7 +374,8 @@ impl Read for ChildStderr {
372374
373375 #[ inline]
374376 unsafe fn initializer ( & self ) -> Initializer {
375- Initializer :: nop ( )
377+ // SAFETY: Read is guaranteed to work on uninitialized memory
378+ unsafe { Initializer :: nop ( ) }
376379 }
377380}
378381
You can’t perform that action at this time.
0 commit comments