Skip to content

Commit 469a6bc

Browse files
committed
Merge pull request #6 from ljrmorgan/master
Fix deprecation warnings
2 parents 27338cb + 4880260 commit 469a6bc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn list_dir_sorted(path: &Path) -> Option<Vec<Path>> {
176176
match fs::readdir(path) {
177177
Ok(mut children) => {
178178
children.sort_by(|p1, p2| p2.filename().cmp(&p1.filename()));
179-
Some(children.move_iter().collect())
179+
Some(children.into_iter().collect())
180180
}
181181
Err(..) => None
182182
}
@@ -297,12 +297,12 @@ impl Pattern {
297297
match c {
298298
// note that ! does not need escaping because it is only special inside brackets
299299
'?' | '*' | '[' | ']' => {
300-
escaped.push_char('[');
301-
escaped.push_char(c);
302-
escaped.push_char(']');
300+
escaped.push('[');
301+
escaped.push(c);
302+
escaped.push(']');
303303
}
304304
c => {
305-
escaped.push_char(c);
305+
escaped.push(c);
306306
}
307307
}
308308
}
@@ -441,7 +441,7 @@ fn fill_todo(todo: &mut Vec<(Path, uint)>, patterns: &[Pattern], idx: uint, path
441441
let mut s = String::new();
442442
for token in pattern.tokens.iter() {
443443
match *token {
444-
Char(c) => s.push_char(c),
444+
Char(c) => s.push(c),
445445
_ => return None
446446
}
447447
}
@@ -477,7 +477,7 @@ fn fill_todo(todo: &mut Vec<(Path, uint)>, patterns: &[Pattern], idx: uint, path
477477
None => {
478478
match list_dir_sorted(path) {
479479
Some(entries) => {
480-
todo.extend(entries.move_iter().map(|x|(x, idx)));
480+
todo.extend(entries.into_iter().map(|x|(x, idx)));
481481

482482
// Matching the special directory entries . and .. that refer to
483483
// the current and parent directory respectively requires that

tests/glob-std.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ macro_rules! assert_eq ( ($e1:expr, $e2:expr) => (
2929
fn main() {
3030
fn mk_file(path: &str, directory: bool) {
3131
if directory {
32-
io::fs::mkdir(&Path::new(path), io::UserRWX).unwrap();
32+
io::fs::mkdir(&Path::new(path), io::USER_RWX).unwrap();
3333
} else {
3434
io::File::create(&Path::new(path)).unwrap();
3535
}

0 commit comments

Comments
 (0)