Skip to content

Commit 12e8512

Browse files
committed
collections: Deprecate Vec::tailn. Same as slice_from
1 parent c9abc01 commit 12e8512

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcollections/vec.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,9 @@ impl<T> Vec<T> {
912912
/// assert!(vec.tailn(2) == [3, 4]);
913913
/// ```
914914
#[inline]
915+
#[deprecated = "use slice_from"]
915916
pub fn tailn<'a>(&'a self, n: uint) -> &'a [T] {
916-
self.as_slice().tailn(n)
917+
self.as_slice().slice_from(n)
917918
}
918919

919920
/// Returns a reference to the last element of a vector, or `None` if it is

0 commit comments

Comments
 (0)