about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2020-05-11 11:46:13 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2020-05-12 08:39:08 +1000
commita3cc435f5755f5550d4235779de58b53a22f0f1e (patch)
tree72f5bbb4ba857445f50ed48894fc0644e187d78e /src/liballoc
parent99cb9ccb9ca2067ad6e60508e3d52da77396b2f1 (diff)
downloadrust-a3cc435f5755f5550d4235779de58b53a22f0f1e.tar.gz
rust-a3cc435f5755f5550d4235779de58b53a22f0f1e.zip
Remove `RawVec::double_in_place`.
It's unused.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/raw_vec.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs
index a8e19c9cbaa..ac5399acddb 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -269,24 +269,6 @@ impl<T, A: AllocRef> RawVec<T, A> {
         }
     }
 
-    /// Attempts to double the size of the type's backing allocation in place. This is common
-    /// enough to want to do that it's easiest to just have a dedicated method. Slightly
-    /// more efficient logic can be provided for this than the general case.
-    ///
-    /// Returns `true` if the reallocation attempt has succeeded.
-    ///
-    /// # Panics
-    ///
-    /// * Panics if `T` is zero-sized on the assumption that you managed to exhaust
-    ///   all `usize::MAX` slots in your imaginary buffer.
-    /// * Panics on 32-bit platforms if the requested capacity exceeds
-    ///   `isize::MAX` bytes.
-    #[inline(never)]
-    #[cold]
-    pub fn double_in_place(&mut self) -> bool {
-        self.grow(Double, InPlace, Uninitialized).is_ok()
-    }
-
     /// Ensures that the buffer contains at least enough space to hold
     /// `used_capacity + needed_extra_capacity` elements. If it doesn't already have
     /// enough capacity, will reallocate enough space plus comfortable slack