mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 11:04:03 +00:00
ddbc6176de
MaybeUninit::copy/clone_from_slice This PR adds 2 new methods to MaybeUninit under the feature of `maybe_uninit_write_slice`: `copy_from_slice` and `clone_from_slice`. These are useful for initializing uninitialized buffers (such as the one returned by `Vec::spare_capacity_mut` for example) with initialized data. The methods behave similarly to the methods on slices, but the destination is uninitialized and they return the destination slice as an initialized slice. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |