Add #[must_use] to remaining std functions (A-N)
This commit is contained in:
parent
e249ce6b23
commit
e129d49f88
18 changed files with 68 additions and 14 deletions
|
@ -1310,6 +1310,7 @@ pub struct Initializer(bool);
|
|||
impl Initializer {
|
||||
/// Returns a new `Initializer` which will zero out buffers.
|
||||
#[unstable(feature = "read_initializer", issue = "42788")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn zeroing() -> Initializer {
|
||||
Initializer(true)
|
||||
|
@ -1324,6 +1325,7 @@ impl Initializer {
|
|||
/// the method accurately reflects the number of bytes that have been
|
||||
/// written to the head of the buffer.
|
||||
#[unstable(feature = "read_initializer", issue = "42788")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub unsafe fn nop() -> Initializer {
|
||||
Initializer(false)
|
||||
|
@ -1331,6 +1333,7 @@ impl Initializer {
|
|||
|
||||
/// Indicates if a buffer should be initialized.
|
||||
#[unstable(feature = "read_initializer", issue = "42788")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn should_initialize(&self) -> bool {
|
||||
self.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue