@@ -404,22 +404,6 @@ impl<T> Vec<T> {
404
404
Self :: with_capacity_in ( capacity, AbortAlloc ( Global ) )
405
405
}
406
406
407
- /// Like `with_capacity`, but guarantees the buffer is zeroed.
408
- ///
409
- /// # Panics
410
- ///
411
- /// * if the requested capacity exceeds `usize::MAX` bytes.
412
- /// * on 32-bit platforms if the requested capacity exceeds `isize::MAX` bytes.
413
- ///
414
- /// # Aborts
415
- ///
416
- /// * on OOM
417
- #[ inline]
418
- #[ must_use]
419
- pub fn with_capacity_zeroed ( capacity : usize ) -> Self {
420
- Self :: with_capacity_zeroed_in ( capacity, AbortAlloc ( Global ) )
421
- }
422
-
423
407
/// Creates a `Vec<T>` directly from the raw components of another vector.
424
408
///
425
409
/// # Safety
@@ -533,43 +517,6 @@ impl<T, A: DeallocRef> Vec<T, A> {
533
517
} )
534
518
}
535
519
536
- #[ inline]
537
- /// Like `with_capacity_zeroed` but parameterized over the choice of allocator for the returned
538
- /// `Vec`.
539
- ///
540
- /// # Panics
541
- ///
542
- /// * if the requested capacity exceeds `usize::MAX` bytes.
543
- /// * on 32-bit platforms if the requested capacity exceeds `isize::MAX` bytes.
544
- pub fn with_capacity_zeroed_in ( capacity : usize , a : A ) -> Self
545
- where
546
- A : AllocRef < Error = !> ,
547
- {
548
- Self {
549
- buf : RawVec :: with_capacity_zeroed_in ( capacity, a) ,
550
- len : 0 ,
551
- }
552
- }
553
-
554
- #[ inline]
555
- /// Like `with_capacity_zeroed` but parameterized over the choice of allocator for the returned
556
- /// `Vec`.
557
- ///
558
- /// # Errors
559
- ///
560
- /// * `CapacityOverflow` if the requested capacity exceeds `usize::MAX` bytes.
561
- /// * `CapacityOverflow` on 32-bit platforms if the requested capacity exceeds `isize::MAX` bytes.
562
- /// * `AllocError` on OOM
563
- pub fn try_with_capacity_zeroed_in ( capacity : usize , a : A ) -> Result < Self , CollectionAllocErr < A > >
564
- where
565
- A : AllocRef ,
566
- {
567
- Ok ( Self {
568
- buf : RawVec :: try_with_capacity_zeroed_in ( capacity, a) ?,
569
- len : 0 ,
570
- } )
571
- }
572
-
573
520
/// Like `from_raw_parts` but parameterized over the choice of allocator for the returned
574
521
/// `Vec`.
575
522
/// # Safety
0 commit comments