|
25 | 25 | html_root_url = "http://doc.rust-lang.org/glob/")]
|
26 | 26 | #![cfg_attr(test, deny(warnings))]
|
27 | 27 | #![cfg_attr(test, feature(env))]
|
28 |
| -#![feature(old_path, old_io, core, collections, hash, unicode)] |
| 28 | +#![feature(old_path, old_io, core, collections, unicode)] |
29 | 29 |
|
30 | 30 | use std::ascii::AsciiExt;
|
31 | 31 | use std::cell::Cell;
|
@@ -152,7 +152,7 @@ pub fn glob_with(pattern: &str, options: &MatchOptions) -> Result<Paths, Pattern
|
152 | 152 | fn to_scope(p: Path) -> Path { p }
|
153 | 153 |
|
154 | 154 | let root = Path::new(pattern).root_path();
|
155 |
| - let root_len = root.as_ref().map_or(0us, |p| p.as_vec().len()); |
| 155 | + let root_len = root.as_ref().map_or(0, |p| p.as_vec().len()); |
156 | 156 |
|
157 | 157 | if root.is_some() && check_windows_verbatim(root.as_ref().unwrap()) {
|
158 | 158 | // FIXME: How do we want to handle verbatim paths? I'm inclined to return nothing,
|
@@ -982,13 +982,13 @@ mod test {
|
982 | 982 | fn test_range_pattern() {
|
983 | 983 |
|
984 | 984 | let pat = Pattern::new("a[0-9]b").unwrap();
|
985 |
| - for i in range(0us, 10) { |
| 985 | + for i in 0..10 { |
986 | 986 | assert!(pat.matches(format!("a{}b", i).as_slice()));
|
987 | 987 | }
|
988 | 988 | assert!(!pat.matches("a_b"));
|
989 | 989 |
|
990 | 990 | let pat = Pattern::new("a[!0-9]b").unwrap();
|
991 |
| - for i in range(0us, 10) { |
| 991 | + for i in 0..10 { |
992 | 992 | assert!(!pat.matches(format!("a{}b", i).as_slice()));
|
993 | 993 | }
|
994 | 994 | assert!(pat.matches("a_b"));
|
|
0 commit comments