about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2019-06-11 21:13:48 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2019-06-11 21:13:48 -0700
commit0150448f1b5474bb0c5fe3297eed0c51dae44dc8 (patch)
tree0557e2308eb6f6c38bd2a1a7eacfed2dacc5e8bf /src/liballoc
parent5168f5d220d0b30d322f254f51142931a9054056 (diff)
downloadrust-0150448f1b5474bb0c5fe3297eed0c51dae44dc8.tar.gz
rust-0150448f1b5474bb0c5fe3297eed0c51dae44dc8.zip
Remove the questionably-useful example
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/vec_deque.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index f01b3155525..71faf672962 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -2714,28 +2714,6 @@ impl<T> From<Vec<T>> for VecDeque<T> {
     /// This avoids reallocating where possible, but the conditions for that are
     /// strict, and subject to change, and so shouldn't be relied upon unless the
     /// `Vec<T>` came from `From<VecDeque<T>>` and hasn't been reallocated.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use std::collections::VecDeque;
-    ///
-    /// // Start with a `VecDeque<i32>`.
-    /// let deque: VecDeque<_> = (1..5).collect();
-    ///
-    /// // Turn it into a `Vec<i32>` with no allocation needed.
-    /// let mut vec = Vec::from(deque);
-    ///
-    /// // Modify it, being careful not to trigger reallocation.
-    /// vec.pop();
-    /// vec.push(100);
-    ///
-    /// // Turn it back into a `VecDeque<i32>` with no allocation needed.
-    /// let ptr = vec.as_ptr();
-    /// let deque = VecDeque::from(vec);
-    /// assert_eq!(deque, [1, 2, 3, 100]);
-    /// assert_eq!(deque.as_slices().0.as_ptr(), ptr);
-    /// ```
     fn from(mut other: Vec<T>) -> Self {
         unsafe {
             let other_buf = other.as_mut_ptr();