diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-01-21 23:11:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-21 23:11:41 +0100 |
| commit | c354bb8174eadbf6ee7c87bc46400e32868dc4b2 (patch) | |
| tree | 8d87689fd6e8a3f76ab790e9b61046b75f9160a0 /src/liballoc/vec_deque.rs | |
| parent | 35221d8d68911d0b14262f7f46e9783e335ba298 (diff) | |
| parent | ea814b84630ee878c18ad1abff47a0e5236a2ad5 (diff) | |
| download | rust-c354bb8174eadbf6ee7c87bc46400e32868dc4b2.tar.gz rust-c354bb8174eadbf6ee7c87bc46400e32868dc4b2.zip | |
Rollup merge of #47595 - PieterPenninckx:master, r=shepmaster
Small improvements to the documentation of VecDeque. Some 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 69557fe2789..9259138bab0 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 > len`. /// /// # 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 } |
