Skip to content

Commit e229fa9

Browse files
committed
Remove useless as usize
1 parent 21962b9 commit e229fa9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl Iterator for Paths {
342342
if let Some(scope) = self.scope.take() {
343343
if !self.dir_patterns.is_empty() {
344344
// Shouldn't happen, but we're using -1 as a special index.
345-
assert!(self.dir_patterns.len() < !0 as usize);
345+
assert!(self.dir_patterns.len() < !0);
346346

347347
fill_todo(&mut self.todo, &self.dir_patterns, 0, &scope, self.options);
348348
}
@@ -360,7 +360,7 @@ impl Iterator for Paths {
360360

361361
// idx -1: was already checked by fill_todo, maybe path was '.' or
362362
// '..' that we can't match here because of normalization.
363-
if idx == !0 as usize {
363+
if idx == !0 {
364364
if self.require_dir && !is_dir(&path) {
365365
continue;
366366
}
@@ -839,7 +839,7 @@ fn fill_todo(
839839
// We know it's good, so don't make the iterator match this path
840840
// against the pattern again. In particular, it can't match
841841
// . or .. globs since these never show up as path components.
842-
todo.push(Ok((next_path, !0 as usize)));
842+
todo.push(Ok((next_path, !0)));
843843
} else {
844844
fill_todo(todo, patterns, idx + 1, &next_path, options);
845845
}

0 commit comments

Comments
 (0)