1
Fork 0

Remove a slew of old deprecated functions

This commit is contained in:
Alex Crichton 2014-05-22 10:40:07 -07:00
parent 257a73ce82
commit 0dd4c1e7bd
12 changed files with 9 additions and 237 deletions

View file

@ -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> {