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/libstd | |
| parent | 257a73ce8273d026f2af1a5021ae2d1a4e7b95e5 (diff) | |
| download | rust-0dd4c1e7bd0178ca91ea13dfad6efc4cce728302.tar.gz rust-0dd4c1e7bd0178ca91ea13dfad6efc4cce728302.zip | |
Remove a slew of old deprecated functions
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/path/mod.rs | 12 | ||||
| -rw-r--r-- | src/libstd/path/posix.rs | 22 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 25 | ||||
| -rw-r--r-- | src/libstd/slice.rs | 16 | ||||
| -rw-r--r-- | src/libstd/str.rs | 4 |
5 files changed, 5 insertions, 74 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index 2960d55f337..b6550a9d77b 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -96,28 +96,16 @@ pub use Path = self::windows::Path; /// Typedef for the platform-native component iterator #[cfg(unix)] pub use Components = self::posix::Components; -/// Typedef for the platform-native reverse component iterator -#[cfg(unix)] -pub use RevComponents = self::posix::RevComponents; /// Typedef for the platform-native component iterator #[cfg(windows)] pub use Components = self::windows::Components; -/// Typedef for the platform-native reverse component iterator -#[cfg(windows)] -pub use RevComponents = self::windows::RevComponents; /// Typedef for the platform-native str component iterator #[cfg(unix)] pub use StrComponents = self::posix::StrComponents; -/// Typedef for the platform-native reverse str component iterator -#[cfg(unix)] -pub use RevStrComponents = self::posix::RevStrComponents; /// Typedef for the platform-native str component iterator #[cfg(windows)] pub use StrComponents = self::windows::StrComponents; -/// Typedef for the platform-native reverse str component iterator -#[cfg(windows)] -pub use RevStrComponents = self::windows::RevStrComponents; /// Alias for the platform-native separator character. #[cfg(unix)] diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 4f7132dc6e4..9517d6618a9 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -16,7 +16,7 @@ use clone::Clone; use cmp::{Eq, TotalEq}; use from_str::FromStr; use io::Writer; -use iter::{DoubleEndedIterator, Rev, AdditiveIterator, Extendable, Iterator, Map}; +use iter::{DoubleEndedIterator, AdditiveIterator, Extendable, Iterator, Map}; use option::{Option, None, Some}; use str; use str::Str; @@ -28,16 +28,10 @@ use super::{BytesContainer, GenericPath, GenericPathUnsafe}; /// Iterator that yields successive components of a Path as &[u8] pub type Components<'a> = Splits<'a, u8>; -/// Iterator that yields components of a Path in reverse as &[u8] -#[deprecated = "replaced by Rev<Components<'a>>"] -pub type RevComponents<'a> = Rev<Components<'a>>; /// Iterator that yields successive components of a Path as Option<&str> pub type StrComponents<'a> = Map<'a, &'a [u8], Option<&'a str>, Components<'a>>; -/// Iterator that yields components of a Path in reverse as Option<&str> -#[deprecated = "replaced by Rev<StrComponents<'a>>"] -pub type RevStrComponents<'a> = Rev<StrComponents<'a>>; /// Represents a POSIX file path #[deriving(Clone)] @@ -414,25 +408,11 @@ impl Path { ret } - /// Returns an iterator that yields each component of the path in reverse. - /// See components() for details. - #[deprecated = "replaced by .components().rev()"] - pub fn rev_components<'a>(&'a self) -> Rev<Components<'a>> { - self.components().rev() - } - /// Returns an iterator that yields each component of the path as Option<&str>. /// See components() for details. pub fn str_components<'a>(&'a self) -> StrComponents<'a> { self.components().map(str::from_utf8) } - - /// Returns an iterator that yields each component of the path in reverse as Option<&str>. - /// See components() for details. - #[deprecated = "replaced by .str_components().rev()"] - pub fn rev_str_components<'a>(&'a self) -> Rev<StrComponents<'a>> { - self.str_components().rev() - } } // None result means the byte vector didn't need normalizing diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 176788edcc4..be9472338cd 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -17,7 +17,7 @@ use cmp::{Eq, TotalEq}; use container::Container; use from_str::FromStr; use io::Writer; -use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Rev, Iterator, Map}; +use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Iterator, Map}; use mem; use option::{Option, Some, None}; use slice::{Vector, OwnedVector, ImmutableVector}; @@ -33,19 +33,10 @@ use super::{contains_nul, BytesContainer, GenericPath, GenericPathUnsafe}; /// every component in WindowsPath is guaranteed to be Some. pub type StrComponents<'a> = Map<'a, &'a str, Option<&'a str>, CharSplits<'a, char>>; -/// Iterator that yields components of a Path in reverse as &str -/// -/// Each component is yielded as Option<&str> for compatibility with PosixPath, but -/// every component in WindowsPath is guaranteed to be Some. -#[deprecated = "replaced by Rev<StrComponents<'a>>"] -pub type RevStrComponents<'a> = Rev<StrComponents<'a>>; /// Iterator that yields successive components of a Path as &[u8] pub type Components<'a> = Map<'a, Option<&'a str>, &'a [u8], StrComponents<'a>>; -/// Iterator that yields components of a Path in reverse as &[u8] -#[deprecated = "replaced by Rev<Components<'a>>"] -pub type RevComponents<'a> = Rev<Components<'a>>; /// Represents a Windows path // Notes for Windows path impl: @@ -650,13 +641,6 @@ impl Path { ret } - /// Returns an iterator that yields each component of the path in reverse as an Option<&str> - /// See str_components() for details. - #[deprecated = "replaced by .str_components().rev()"] - pub fn rev_str_components<'a>(&'a self) -> Rev<StrComponents<'a>> { - self.str_components().rev() - } - /// Returns an iterator that yields each component of the path in turn as a &[u8]. /// See str_components() for details. pub fn components<'a>(&'a self) -> Components<'a> { @@ -667,13 +651,6 @@ impl Path { self.str_components().map(convert) } - /// Returns an iterator that yields each component of the path in reverse as a &[u8]. - /// See str_components() for details. - #[deprecated = "replaced by .components().rev()"] - pub fn rev_components<'a>(&'a self) -> Rev<Components<'a>> { - self.components().rev() - } - fn equiv_prefix(&self, other: &Path) -> bool { let s_repr = self.repr.as_slice(); let o_repr = other.repr.as_slice(); diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index e78122f699d..4f7bb2aec08 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -116,7 +116,7 @@ use vec::Vec; pub use core::slice::{ref_slice, mut_ref_slice, Splits, Windows}; pub use core::slice::{Chunks, Vector, ImmutableVector, ImmutableEqVector}; pub use core::slice::{ImmutableTotalOrdVector, MutableVector, Items, MutItems}; -pub use core::slice::{RevItems, RevMutItems, MutSplits, MutChunks}; +pub use core::slice::{MutSplits, MutChunks}; pub use core::slice::{bytes, MutableCloneableVector}; // Functional utilities @@ -403,10 +403,6 @@ pub trait OwnedVector<T> { /// } /// ``` fn move_iter(self) -> MoveItems<T>; - /// Creates a consuming iterator that moves out of the vector in - /// reverse order. - #[deprecated = "replaced by .move_iter().rev()"] - fn move_rev_iter(self) -> Rev<MoveItems<T>>; /** * Partitions the vector into two vectors `(A,B)`, where all @@ -426,12 +422,6 @@ impl<T> OwnedVector<T> for ~[T] { } #[inline] - #[deprecated = "replaced by .move_iter().rev()"] - fn move_rev_iter(self) -> Rev<MoveItems<T>> { - self.move_iter().rev() - } - - #[inline] fn partition(self, f: |&T| -> bool) -> (Vec<T>, Vec<T>) { let mut lefts = Vec::new(); let mut rights = Vec::new(); @@ -776,10 +766,6 @@ impl<T> Drop for MoveItems<T> { } } -/// An iterator that moves out of a vector in reverse order. -#[deprecated = "replaced by Rev<MoveItems<'a, T>>"] -pub type RevMoveItems<T> = Rev<MoveItems<T>>; - #[cfg(test)] mod tests { use prelude::*; diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 617887e8af3..0c77830ee86 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -93,8 +93,8 @@ use slice::{ImmutableVector, MutableVector, CloneableVector}; use strbuf::StrBuf; use vec::Vec; -pub use core::str::{from_utf8, CharEq, Chars, CharOffsets, RevChars}; -pub use core::str::{RevCharOffsets, Bytes, RevBytes, CharSplits, RevCharSplits}; +pub use core::str::{from_utf8, CharEq, Chars, CharOffsets}; +pub use core::str::{Bytes, CharSplits}; pub use core::str::{CharSplitsN, Words, AnyLines, MatchIndices, StrSplits}; pub use core::str::{eq_slice, eq, is_utf8, is_utf16, UTF16Items}; pub use core::str::{UTF16Item, ScalarValue, LoneSurrogate, utf16_items}; |
