Remove a slew of old deprecated functions
This commit is contained in:
parent
257a73ce82
commit
0dd4c1e7bd
12 changed files with 9 additions and 237 deletions
|
|
@ -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
|
||||
|
|
@ -580,12 +571,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 {
|
||||
|
|
@ -604,12 +589,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 {
|
||||
|
|
@ -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.
|
||||
|
|
@ -1045,12 +1020,6 @@ impl<'a,T> MutableVector<'a, T> for &'a mut [T] {
|
|||
Some(&mut self[len - 1])
|
||||
}
|
||||
|
||||
#[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`.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -1681,34 +1653,16 @@ impl<'a> StrSlice<'a> for &'a str {
|
|||
Chars{string: *self}
|
||||
}
|
||||
|
||||
#[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 {
|
||||
|
|
@ -1739,12 +1693,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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue