Skip to content

Commit f04fde6

Browse files
committed
Update to rust master
1 parent 421b5ee commit f04fde6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
html_root_url = "http://doc.rust-lang.org/glob/")]
2626
#![cfg_attr(test, deny(warnings))]
2727
#![cfg_attr(test, feature(env))]
28-
#![feature(old_path, old_io, core, collections, hash, unicode)]
28+
#![feature(old_path, old_io, core, collections, unicode)]
2929

3030
use std::ascii::AsciiExt;
3131
use std::cell::Cell;
@@ -152,7 +152,7 @@ pub fn glob_with(pattern: &str, options: &MatchOptions) -> Result<Paths, Pattern
152152
fn to_scope(p: Path) -> Path { p }
153153

154154
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());
156156

157157
if root.is_some() && check_windows_verbatim(root.as_ref().unwrap()) {
158158
// FIXME: How do we want to handle verbatim paths? I'm inclined to return nothing,
@@ -982,13 +982,13 @@ mod test {
982982
fn test_range_pattern() {
983983

984984
let pat = Pattern::new("a[0-9]b").unwrap();
985-
for i in range(0us, 10) {
985+
for i in 0..10 {
986986
assert!(pat.matches(format!("a{}b", i).as_slice()));
987987
}
988988
assert!(!pat.matches("a_b"));
989989

990990
let pat = Pattern::new("a[!0-9]b").unwrap();
991-
for i in range(0us, 10) {
991+
for i in 0..10 {
992992
assert!(!pat.matches(format!("a{}b", i).as_slice()));
993993
}
994994
assert!(pat.matches("a_b"));

0 commit comments

Comments
 (0)