Skip to content

Commit 247e244

Browse files
author
bors-servo
authored
Auto merge of #77 - mbrubeck:deprecated, r=jdm
[breaking change] Remove previously deprecated items Remove the `SmallVecN` type aliases and the `push_all_move` method. These have been deprecated since version 0.3.1. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/77) <!-- Reviewable:end -->
2 parents 6dc5573 + 04ee6cd commit 247e244

File tree

1 file changed

+5
-49
lines changed

1 file changed

+5
-49
lines changed

lib.rs

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use SmallVecData::{Inline, Heap};
6262
/// ## Example
6363
///
6464
/// ```rust
65-
/// use smallvec::{VecLike, SmallVec8};
65+
/// use smallvec::{VecLike, SmallVec};
6666
///
6767
/// fn initialize<V: VecLike<u8>>(v: &mut V) {
6868
/// for i in 0..5 {
@@ -73,7 +73,7 @@ use SmallVecData::{Inline, Heap};
7373
/// let mut vec = Vec::new();
7474
/// initialize(&mut vec);
7575
///
76-
/// let mut small_vec = SmallVec8::new();
76+
/// let mut small_vec = SmallVec::<[u8; 8]>::new();
7777
/// initialize(&mut small_vec);
7878
/// ```
7979
#[deprecated(note = "Use `Extend` and `Deref<[T]>` instead")]
@@ -108,7 +108,7 @@ impl<T> VecLike<T> for Vec<T> {
108108
/// ## Example
109109
///
110110
/// ```rust
111-
/// use smallvec::{ExtendFromSlice, SmallVec8};
111+
/// use smallvec::{ExtendFromSlice, SmallVec};
112112
///
113113
/// fn initialize<V: ExtendFromSlice<u8>>(v: &mut V) {
114114
/// v.extend_from_slice(b"Test!");
@@ -118,7 +118,7 @@ impl<T> VecLike<T> for Vec<T> {
118118
/// initialize(&mut vec);
119119
/// assert_eq!(&vec, b"Test!");
120120
///
121-
/// let mut small_vec = SmallVec8::new();
121+
/// let mut small_vec = SmallVec::<[u8; 8]>::new();
122122
/// initialize(&mut small_vec);
123123
/// assert_eq!(&small_vec as &[_], b"Test!");
124124
/// ```
@@ -235,19 +235,13 @@ impl<A: Array> Drop for SmallVecData<A> {
235235
/// store can be any type that implements the `Array` trait; usually it is a small fixed-sized
236236
/// array. For example a `SmallVec<[u64; 8]>` can hold up to eight 64-bit integers inline.
237237
///
238-
/// Type aliases like `SmallVec8<T>` are provided as convenient shorthand for types like
239-
/// `SmallVec<[T; 8]>`.
240-
///
241238
/// ## Example
242239
///
243240
/// ```rust
244241
/// use smallvec::SmallVec;
245242
/// let mut v = SmallVec::<[u8; 4]>::new(); // initialize an empty vector
246243
///
247-
/// use smallvec::SmallVec4;
248-
/// let mut v: SmallVec4<u8> = SmallVec::new(); // alternate way to write the above
249-
///
250-
/// // SmallVec4 can hold up to 4 items without spilling onto the heap.
244+
/// // The vector can hold up to 4 items without spilling onto the heap.
251245
/// v.extend(0..4);
252246
/// assert_eq!(v.len(), 4);
253247
/// assert!(!v.spilled());
@@ -414,14 +408,6 @@ impl<A: Array> SmallVec<A> {
414408
}
415409
}
416410

417-
/// Append elements from an iterator.
418-
///
419-
/// This function is deprecated; it has been replaced by `Extend::extend`.
420-
#[deprecated(note = "Use `extend` instead")]
421-
pub fn push_all_move<V: IntoIterator<Item=A::Item>>(&mut self, other: V) {
422-
self.extend(other)
423-
}
424-
425411
/// Remove an item from the end of the vector and return it, or None if empty.
426412
#[inline]
427413
pub fn pop(&mut self) -> Option<A::Item> {
@@ -1110,36 +1096,6 @@ impl<'a, A: Array> IntoIterator for &'a mut SmallVec<A> {
11101096
}
11111097
}
11121098

1113-
// TODO: Remove these and its users.
1114-
1115-
/// Deprecated alias to ease transition from an earlier version.
1116-
#[deprecated]
1117-
pub type SmallVec1<T> = SmallVec<[T; 1]>;
1118-
1119-
/// Deprecated alias to ease transition from an earlier version.
1120-
#[deprecated]
1121-
pub type SmallVec2<T> = SmallVec<[T; 2]>;
1122-
1123-
/// Deprecated alias to ease transition from an earlier version.
1124-
#[deprecated]
1125-
pub type SmallVec4<T> = SmallVec<[T; 4]>;
1126-
1127-
/// Deprecated alias to ease transition from an earlier version.
1128-
#[deprecated]
1129-
pub type SmallVec8<T> = SmallVec<[T; 8]>;
1130-
1131-
/// Deprecated alias to ease transition from an earlier version.
1132-
#[deprecated]
1133-
pub type SmallVec16<T> = SmallVec<[T; 16]>;
1134-
1135-
/// Deprecated alias to ease transition from an earlier version.
1136-
#[deprecated]
1137-
pub type SmallVec24<T> = SmallVec<[T; 24]>;
1138-
1139-
/// Deprecated alias to ease transition from an earlier version.
1140-
#[deprecated]
1141-
pub type SmallVec32<T> = SmallVec<[T; 32]>;
1142-
11431099
/// Types that can be used as the backing store for a SmallVec
11441100
pub unsafe trait Array {
11451101
/// The type of the array's elements.

0 commit comments

Comments
 (0)