std: replace str::all/any fns and methods with iterators

This commit is contained in:
Huon Wilson
2013-06-10 00:34:23 +10:00
parent 1e8982bdb2
commit b29cd22bce
10 changed files with 15 additions and 60 deletions

View File

@@ -508,7 +508,7 @@ impl GenericPath for PosixPath {
}
fn with_filename(&self, f: &str) -> PosixPath {
assert!(! str::any(f, |c| windows::is_sep(c)));
assert!(! f.iter().all(windows::is_sep));
self.dir_path().push(f)
}
@@ -722,7 +722,7 @@ impl GenericPath for WindowsPath {
}
fn with_filename(&self, f: &str) -> WindowsPath {
assert!(! str::any(f, |c| windows::is_sep(c)));
assert!(! f.iter().all(windows::is_sep));
self.dir_path().push(f)
}