deny(unsafe_op_in_unsafe_fn) in libstd/process.rs
This commit is contained in:
parent
a9025c571e
commit
73e27b3e18
1 changed files with 5 additions and 2 deletions
|
@ -105,6 +105,7 @@
|
||||||
//! [`Read`]: ../io/trait.Read.html
|
//! [`Read`]: ../io/trait.Read.html
|
||||||
|
|
||||||
#![stable(feature = "process", since = "1.0.0")]
|
#![stable(feature = "process", since = "1.0.0")]
|
||||||
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
|
|
||||||
use crate::io::prelude::*;
|
use crate::io::prelude::*;
|
||||||
|
|
||||||
|
@ -311,7 +312,8 @@ impl Read for ChildStdout {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn initializer(&self) -> Initializer {
|
unsafe fn initializer(&self) -> Initializer {
|
||||||
Initializer::nop()
|
// SAFETY: Read is guaranteed to work on uninitialized memory
|
||||||
|
unsafe { Initializer::nop() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +374,8 @@ impl Read for ChildStderr {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn initializer(&self) -> Initializer {
|
unsafe fn initializer(&self) -> Initializer {
|
||||||
Initializer::nop()
|
// SAFETY: Read is guaranteed to work on uninitialized memory
|
||||||
|
unsafe { Initializer::nop() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue