diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-22 10:40:07 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-22 11:54:14 -0700 |
| commit | 0dd4c1e7bd0178ca91ea13dfad6efc4cce728302 (patch) | |
| tree | 4f6d876f7b2804f5c47f71c0d436c8b0134fe924 /src/libcore | |
| parent | 257a73ce8273d026f2af1a5021ae2d1a4e7b95e5 (diff) | |
| download | rust-0dd4c1e7bd0178ca91ea13dfad6efc4cce728302.tar.gz rust-0dd4c1e7bd0178ca91ea13dfad6efc4cce728302.zip | |
Remove a slew of old deprecated functions
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/slice.rs | 35 | ||||
| -rw-r--r-- | src/libcore/str.rs | 54 |
2 files changed, 1 insertions, 88 deletions
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 755c6738b4a..3979a1ad8c8 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -386,9 +386,6 @@ pub trait ImmutableVector<'a, T> { fn slice_to(&self, end: uint) -> &'a [T]; /// Returns an iterator over the vector fn iter(self) -> Items<'a, T>; - /// Returns a reversed iterator over a vector - #[deprecated = "replaced by .iter().rev()"] - fn rev_iter(self) -> Rev<Items<'a, T>>; /// Returns an iterator over the subslices of the vector which are /// separated by elements that match `pred`. The matched element /// is not contained in the subslices. @@ -399,12 +396,6 @@ pub trait ImmutableVector<'a, T> { /// the subslices. fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T>; /// Returns an iterator over the subslices of the vector which are - /// separated by elements that match `pred`. This starts at the - /// end of the vector and works backwards. The matched element is - /// not contained in the subslices. - #[deprecated = "replaced by .split(pred).rev()"] - fn rsplit(self, pred: |&T|: 'a -> bool) -> Rev<Splits<'a, T>>; - /// Returns an iterator over the subslices of the vector which are /// separated by elements that match `pred` limited to splitting /// at most `n` times. This starts at the end of the vector and /// works backwards. The matched element is not contained in the @@ -581,12 +572,6 @@ impl<'a,T> ImmutableVector<'a, T> for &'a [T] { } #[inline] - #[deprecated = "replaced by .iter().rev()"] - fn rev_iter(self) -> Rev<Items<'a, T>> { - self.iter().rev() - } - - #[inline] fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T> { Splits { v: self, @@ -605,12 +590,6 @@ impl<'a,T> ImmutableVector<'a, T> for &'a [T] { } #[inline] - #[deprecated = "replaced by .split(pred).rev()"] - fn rsplit(self, pred: |&T|: 'a -> bool) -> Rev<Splits<'a, T>> { - self.split(pred).rev() - } - - #[inline] fn rsplitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T> { SplitsN { iter: self.split(pred), @@ -806,10 +785,6 @@ pub trait MutableVector<'a, T> { /// Returns a mutable pointer to the last item in the vector. fn mut_last(self) -> Option<&'a mut T>; - /// Returns a reversed iterator that allows modifying each value - #[deprecated = "replaced by .mut_iter().rev()"] - fn mut_rev_iter(self) -> Rev<MutItems<'a, T>>; - /// Returns an iterator over the mutable subslices of the vector /// which are separated by elements that match `pred`. The /// matched element is not contained in the subslices. @@ -1046,12 +1021,6 @@ impl<'a,T> MutableVector<'a, T> for &'a mut [T] { } #[inline] - #[deprecated = "replaced by .mut_iter().rev()"] - fn mut_rev_iter(self) -> Rev<MutItems<'a, T>> { - self.mut_iter().rev() - } - - #[inline] fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T> { MutSplits { v: self, pred: pred, finished: false } } @@ -1354,8 +1323,6 @@ impl<'a, T> RandomAccessIterator<&'a T> for Items<'a, T> { } iterator!{struct Items -> *T, &'a T} -#[deprecated = "replaced by Rev<Items<'a, T>>"] -pub type RevItems<'a, T> = Rev<Items<'a, T>>; impl<'a, T> ExactSize<&'a T> for Items<'a, T> {} impl<'a, T> ExactSize<&'a mut T> for MutItems<'a, T> {} @@ -1365,8 +1332,6 @@ impl<'a, T> Clone for Items<'a, T> { } iterator!{struct MutItems -> *mut T, &'a mut T} -#[deprecated = "replaced by Rev<MutItems<'a, T>>"] -pub type RevMutItems<'a, T> = Rev<MutItems<'a, T>>; /// An iterator over the subslices of the vector which are separated /// by elements that match `pred`. diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 0d820836377..d6a9b42522c 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -20,7 +20,7 @@ use cmp::{Eq, TotalEq}; use container::Container; use default::Default; use iter::{Filter, Map, Iterator}; -use iter::{Rev, DoubleEndedIterator, ExactSize}; +use iter::{DoubleEndedIterator, ExactSize}; use iter::range; use num::Saturating; use option::{None, Option, Some}; @@ -174,20 +174,11 @@ impl<'a> DoubleEndedIterator<(uint, char)> for CharOffsets<'a> { } } -#[deprecated = "replaced by Rev<Chars<'a>>"] -pub type RevChars<'a> = Rev<Chars<'a>>; - -#[deprecated = "replaced by Rev<CharOffsets<'a>>"] -pub type RevCharOffsets<'a> = Rev<CharOffsets<'a>>; - /// External iterator for a string's bytes. /// Use with the `std::iter` module. pub type Bytes<'a> = Map<'a, &'a u8, u8, slice::Items<'a, u8>>; -#[deprecated = "replaced by Rev<Bytes<'a>>"] -pub type RevBytes<'a> = Rev<Bytes<'a>>; - /// An iterator over the substrings of a string, separated by `sep`. #[deriving(Clone)] pub struct CharSplits<'a, Sep> { @@ -200,9 +191,6 @@ pub struct CharSplits<'a, Sep> { finished: bool, } -#[deprecated = "replaced by Rev<CharSplits<'a, Sep>>"] -pub type RevCharSplits<'a, Sep> = Rev<CharSplits<'a, Sep>>; - /// An iterator over the substrings of a string, separated by `sep`, /// splitting at most `count` times. #[deriving(Clone)] @@ -1080,24 +1068,12 @@ pub trait StrSlice<'a> { /// ``` fn chars(&self) -> Chars<'a>; - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .chars().rev()"] - fn chars_rev(&self) -> Rev<Chars<'a>>; - /// An iterator over the bytes of `self` fn bytes(&self) -> Bytes<'a>; - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .bytes().rev()"] - fn bytes_rev(&self) -> Rev<Bytes<'a>>; - /// An iterator over the characters of `self` and their byte offsets. fn char_indices(&self) -> CharOffsets<'a>; - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .char_indices().rev()"] - fn char_indices_rev(&self) -> Rev<CharOffsets<'a>>; - /// An iterator over substrings of `self`, separated by characters /// matched by `sep`. /// @@ -1159,10 +1135,6 @@ pub trait StrSlice<'a> { /// ``` fn split_terminator<Sep: CharEq>(&self, sep: Sep) -> CharSplits<'a, Sep>; - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .split(sep).rev()"] - fn rsplit<Sep: CharEq>(&self, sep: Sep) -> Rev<CharSplits<'a, Sep>>; - /// An iterator over substrings of `self`, separated by characters /// matched by `sep`, starting from the end of the string. /// Restricted to splitting at most `count` times. @@ -1682,34 +1654,16 @@ impl<'a> StrSlice<'a> for &'a str { } #[inline] - #[deprecated = "replaced by .chars().rev()"] - fn chars_rev(&self) -> RevChars<'a> { - self.chars().rev() - } - - #[inline] fn bytes(&self) -> Bytes<'a> { self.as_bytes().iter().map(|&b| b) } #[inline] - #[deprecated = "replaced by .bytes().rev()"] - fn bytes_rev(&self) -> RevBytes<'a> { - self.bytes().rev() - } - - #[inline] fn char_indices(&self) -> CharOffsets<'a> { CharOffsets{string: *self, iter: self.chars()} } #[inline] - #[deprecated = "replaced by .char_indices().rev()"] - fn char_indices_rev(&self) -> RevCharOffsets<'a> { - self.char_indices().rev() - } - - #[inline] fn split<Sep: CharEq>(&self, sep: Sep) -> CharSplits<'a, Sep> { CharSplits { string: *self, @@ -1740,12 +1694,6 @@ impl<'a> StrSlice<'a> for &'a str { } #[inline] - #[deprecated = "replaced by .split(sep).rev()"] - fn rsplit<Sep: CharEq>(&self, sep: Sep) -> RevCharSplits<'a, Sep> { - self.split(sep).rev() - } - - #[inline] fn rsplitn<Sep: CharEq>(&self, sep: Sep, count: uint) -> CharSplitsN<'a, Sep> { CharSplitsN { |
