mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
collections: Deprecate Vec::tailn. Same as slice_from
This commit is contained in:
@@ -912,8 +912,9 @@ pub fn tail<'a>(&'a self) -> &'a [T] {
|
||||
/// assert!(vec.tailn(2) == [3, 4]);
|
||||
/// ```
|
||||
#[inline]
|
||||
#[deprecated = "use slice_from"]
|
||||
pub fn tailn<'a>(&'a self, n: uint) -> &'a [T] {
|
||||
self.as_slice().tailn(n)
|
||||
self.as_slice().slice_from(n)
|
||||
}
|
||||
|
||||
/// Returns a reference to the last element of a vector, or `None` if it is
|
||||
|
||||
Reference in New Issue
Block a user