Skip to content

Commit 4ed1584

Browse files
committed
Deprecate and hide ExtendFromSlice trait
This trait is only needed for internal benchmarking and should not have been public. It will be removed in version 2.0.
1 parent 6c76c41 commit 4ed1584

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

benches/bench.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(test)]
2+
#![allow(deprecated)]
23

34
#[macro_use]
45
extern crate smallvec;

lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,14 @@ macro_rules! debug_unreachable {
189189
/// initialize(&mut small_vec);
190190
/// assert_eq!(&small_vec as &[_], b"Test!");
191191
/// ```
192+
#[doc(hidden)]
193+
#[deprecated]
192194
pub trait ExtendFromSlice<T> {
193195
/// Extends a collection from a slice of its element type
194196
fn extend_from_slice(&mut self, other: &[T]);
195197
}
196198

199+
#[allow(deprecated)]
197200
impl<T: Clone> ExtendFromSlice<T> for Vec<T> {
198201
fn extend_from_slice(&mut self, other: &[T]) {
199202
Vec::extend_from_slice(self, other)
@@ -1397,6 +1400,7 @@ impl<A: Array, I: SliceIndex<[A::Item]>> ops::IndexMut<I> for SmallVec<A> {
13971400
}
13981401
}
13991402

1403+
#[allow(deprecated)]
14001404
impl<A: Array> ExtendFromSlice<A::Item> for SmallVec<A>
14011405
where
14021406
A::Item: Copy,

0 commit comments

Comments
 (0)