about summary refs log tree commit diff
path: root/src/libstd/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/path.rs')
-rw-r--r--src/libstd/path.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index b2f25d41157..eb78120c6be 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -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)
     }