diff options
| author | Pieter Penninckx <Pieter.Penninckx@scarlet.be> | 2018-01-19 16:51:46 +0100 |
|---|---|---|
| committer | Pieter Penninckx <Pieter.Penninckx@scarlet.be> | 2018-01-19 16:51:46 +0100 |
| commit | 81e6840ff445f5eb9c99ba506aa89b8fc2a1a4c7 (patch) | |
| tree | 4148af35ac5adab8124357be92d278343ba00d94 /src/liballoc/vec_deque.rs | |
| parent | 10333dde82b03c7df2620f742596d3e7714f9e25 (diff) | |
| download | rust-81e6840ff445f5eb9c99ba506aa89b8fc2a1a4c7.tar.gz rust-81e6840ff445f5eb9c99ba506aa89b8fc2a1a4c7.zip | |
Small improvements to the documentation of VecDeque.
Diffstat (limited to 'src/liballoc/vec_deque.rs')
| -rw-r--r-- | src/liballoc/vec_deque.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/liballoc/vec_deque.rs b/src/liballoc/vec_deque.rs index f56aa23a4eb..7d15b790b24 100644 --- a/src/liballoc/vec_deque.rs +++ b/src/liballoc/vec_deque.rs @@ -906,7 +906,7 @@ impl<T> VecDeque<T> { } } - /// Clears the buffer, removing all values. + /// Clears the `VecDeque`, removing all values. /// /// # Examples /// @@ -1624,10 +1624,10 @@ impl<T> VecDeque<T> { return elem; } - /// Splits the collection into two at the given index. + /// Splits the `VecDeque` into two at the given index. /// - /// Returns a newly allocated `Self`. `self` contains elements `[0, at)`, - /// and the returned `Self` contains elements `[at, len)`. + /// Returns a newly allocated `VecDeque`. `self` contains elements `[0, at)`, + /// and the returned `VecDeque` contains elements `[at, len)`. /// /// Note that the capacity of `self` does not change. /// @@ -1635,7 +1635,7 @@ impl<T> VecDeque<T> { /// /// # Panics /// - /// Panics if `at > len` + /// Panics if `at` is out of bounds. /// /// # Examples /// @@ -1815,7 +1815,8 @@ impl<T> VecDeque<T> { impl<T: Clone> VecDeque<T> { /// Modifies the `VecDeque` in-place so that `len()` is equal to new_len, - /// either by removing excess elements or by appending clones of `value` to the back. + /// either by removing excess elements from the back or by appending clones of `value` + /// to the back. /// /// # Examples /// @@ -2390,7 +2391,7 @@ impl<T> IntoIterator for VecDeque<T> { type Item = T; type IntoIter = IntoIter<T>; - /// Consumes the list into a front-to-back iterator yielding elements by + /// Consumes the `VecDeque` into a front-to-back iterator yielding elements by /// value. fn into_iter(self) -> IntoIter<T> { IntoIter { inner: self } |
