rust/library/alloc/src/collections/vec_deque
Kevin Reid 13fca73f49 Replace MaybeUninit::uninit_array() with array repeat expression.
This is possible now that inline const blocks are stable; the idea was
even mentioned as an alternative when `uninit_array()` was added:
<https://github.com/rust-lang/rust/pull/65580#issuecomment-544200681>

> if it’s stabilized soon enough maybe it’s not worth having a
> standard library method that will be replaceable with
> `let buffer = [MaybeUninit::<T>::uninit(); $N];`

Const array repetition and inline const blocks are now stable (in the
next release), so that circumstance has come to pass, and we no longer
have reason to want `uninit_array()` other than convenience. Therefore,
let’s evaluate the inconvenience by not using `uninit_array()` in
the standard library, before potentially deleting it entirely.
2024-06-24 10:23:50 -07:00
..
drain.rs address review comments 2024-02-16 13:11:05 +01:00
into_iter.rs Replace MaybeUninit::uninit_array() with array repeat expression. 2024-06-24 10:23:50 -07:00
iter.rs Use generic NonZero internally. 2024-02-15 08:09:42 +01:00
iter_mut.rs Use generic NonZero internally. 2024-02-15 08:09:42 +01:00
macros.rs Add support for custom allocator in VecDeque 2021-07-23 20:37:09 +02:00
mod.rs Fix VecDeque::shrink_to UB when handle_alloc_error unwinds. 2024-05-07 19:30:34 +00:00
spec_extend.rs Don't use Take in SpecExtend impl 2022-11-26 00:44:24 +01:00
spec_from_iter.rs Spelling library/ 2023-04-26 02:10:22 -04:00
tests.rs Move test_shrink_to_unwind to its own file. 2024-05-07 19:43:54 +00:00