summaryrefslogtreecommitdiff
path: root/CONVENTIONS.md
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-08-30 23:10:22 -0600
committerAlan Somers <asomers@gmail.com>2019-09-03 16:25:41 -0600
commit469032433d68841ad098f03aa2b28e81235b8be8 (patch)
treea34108f1688355ebaa6d5eed8a2eecafc5d32dfa /CONVENTIONS.md
parenta4a465d25567f163f9552b977eb4d17435251d41 (diff)
downloadnix-469032433d68841ad098f03aa2b28e81235b8be8.zip
Replace most instances of mem::uninitialized with mem::MaybeUninit
Only two instances remain: * For the deprecated sys::socket::CmsgSpace::new. We should probably just remove that method. * For sys::termios::Termios::default_uninit. This will require some more thought. Fixes #1096
Diffstat (limited to 'CONVENTIONS.md')
-rw-r--r--CONVENTIONS.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/CONVENTIONS.md b/CONVENTIONS.md
index 48daa937..2461085e 100644
--- a/CONVENTIONS.md
+++ b/CONVENTIONS.md
@@ -76,12 +76,11 @@ to parameters of functions by [enumerations][enum].
Whenever we need to use a [libc][libc] function to properly initialize a
variable and said function allows us to use uninitialized memory, we use
-[`std::mem::uninitialized`][std_uninitialized] (or [`core::mem::uninitialized`][core_uninitialized])
-when defining the variable. This allows us to avoid the overhead incurred by
-zeroing or otherwise initializing the variable.
+[`std::mem::MaybeUninit`][std_MaybeUninit] when defining the variable. This
+allows us to avoid the overhead incurred by zeroing or otherwise initializing
+the variable.
[bitflags]: https://crates.io/crates/bitflags/
-[core_uninitialized]: https://doc.rust-lang.org/core/mem/fn.uninitialized.html
[enum]: https://doc.rust-lang.org/reference.html#enumerations
[libc]: https://crates.io/crates/libc/
-[std_uninitialized]: https://doc.rust-lang.org/std/mem/fn.uninitialized.html
+[std_MaybeUninit]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html