diff options
| author | Sean Chalmers <sclhiannan@gmail.com> | 2014-01-23 20:41:57 +0100 |
|---|---|---|
| committer | Sean Chalmers <sclhiannan@gmail.com> | 2014-01-23 22:18:18 +0100 |
| commit | 292ed3e55c595505069a589e104e365779c27933 (patch) | |
| tree | 58c2e7c5c377cde755fa9fa0ce30109530d2c546 /src/libstd/path | |
| parent | 55d6e0e1b71186a0c246101059047c11f5274505 (diff) | |
Update flip() to be rev().
Consensus leaned in favour of using rev instead of flip.
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/windows.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index ebbb47296d4..cc0705ee76f 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -17,7 +17,7 @@ use clone::Clone; use container::Container; use cmp::Eq; use from_str::FromStr; -use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Flip, Iterator, Map}; +use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Rev, Iterator, Map}; use option::{Option, Some, None}; use str; use str::{CharSplits, OwnedStr, Str, StrVector, StrSlice}; @@ -35,7 +35,7 @@ pub type StrComponents<'a> = Map<'a, &'a str, Option<&'a str>, /// /// Each component is yielded as Option<&str> for compatibility with PosixPath, but /// every component in WindowsPath is guaranteed to be Some. -pub type RevStrComponents<'a> = Flip<Map<'a, &'a str, Option<&'a str>, +pub type RevStrComponents<'a> = Rev<Map<'a, &'a str, Option<&'a str>, CharSplits<'a, char>>>; /// Iterator that yields successive components of a Path as &[u8] @@ -571,8 +571,8 @@ impl GenericPath for Path { fn ends_with_path(&self, child: &Path) -> bool { if !child.is_relative() { return false; } - let mut selfit = self.str_components().flip(); - let mut childit = child.str_components().flip(); + let mut selfit = self.str_components().rev(); + let mut childit = child.str_components().rev(); loop { match (selfit.next(), childit.next()) { (Some(a), Some(b)) => if a != b { return false; }, @@ -628,7 +628,7 @@ impl Path { /// Returns an iterator that yields each component of the path in reverse as an Option<&str> /// See str_components() for details. pub fn rev_str_components<'a>(&'a self) -> RevStrComponents<'a> { - self.str_components().flip() + self.str_components().rev() } /// Returns an iterator that yields each component of the path in turn as a &[u8]. |
