From 12e851208ddd40ca3e1b56badf5eaa32986f55a8 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 6 Aug 2014 20:20:57 -0700 Subject: [PATCH] collections: Deprecate Vec::tailn. Same as slice_from --- src/libcollections/vec.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index fd069f547271..b49e8aa01bb4 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -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