@@ -488,7 +488,7 @@ impl<T> VecDeque<T> {
488
488
VecDeque { tail : 0 , head : 0 , buf : RawVec :: with_capacity ( cap) }
489
489
}
490
490
491
- /// Retrieves an element in the `VecDeque` by index.
491
+ /// Provides a reference to the element at the given index.
492
492
///
493
493
/// Element at index 0 is the front of the queue.
494
494
///
@@ -513,7 +513,7 @@ impl<T> VecDeque<T> {
513
513
}
514
514
}
515
515
516
- /// Retrieves an element in the `VecDeque` mutably by index.
516
+ /// Provides a mutable reference to the element at the given index.
517
517
///
518
518
/// Element at index 0 is the front of the queue.
519
519
///
@@ -651,7 +651,7 @@ impl<T> VecDeque<T> {
651
651
}
652
652
}
653
653
654
- /// Tries to reserves the minimum capacity for exactly `additional` more elements to
654
+ /// Tries to reserve the minimum capacity for exactly `additional` more elements to
655
655
/// be inserted in the given `VecDeque<T>`. After calling `reserve_exact`,
656
656
/// capacity will be greater than or equal to `self.len() + additional`.
657
657
/// Does nothing if the capacity is already sufficient.
@@ -662,7 +662,7 @@ impl<T> VecDeque<T> {
662
662
///
663
663
/// # Errors
664
664
///
665
- /// If the capacity overflows, or the allocator reports a failure, then an error
665
+ /// If the capacity overflows `usize` , or the allocator reports a failure, then an error
666
666
/// is returned.
667
667
///
668
668
/// # Examples
@@ -678,7 +678,7 @@ impl<T> VecDeque<T> {
678
678
/// // Pre-reserve the memory, exiting if we can't
679
679
/// output.try_reserve_exact(data.len())?;
680
680
///
681
- /// // Now we know this can't OOM in the middle of our complex work
681
+ /// // Now we know this can't OOM(Out-Of-Memory) in the middle of our complex work
682
682
/// output.extend(data.iter().map(|&val| {
683
683
/// val * 2 + 5 // very complicated
684
684
/// }));
@@ -700,7 +700,7 @@ impl<T> VecDeque<T> {
700
700
///
701
701
/// # Errors
702
702
///
703
- /// If the capacity overflows, or the allocator reports a failure, then an error
703
+ /// If the capacity overflows `usize` , or the allocator reports a failure, then an error
704
704
/// is returned.
705
705
///
706
706
/// # Examples
0 commit comments