Skip to content

Commit 56be6e1

Browse files
committed
Remove useless as usize
1 parent 53daa42 commit 56be6e1

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
@@ -389,7 +389,7 @@ impl Iterator for Paths {
389389
if let Some(scope) = self.scope.take() {
390390
if !self.dir_patterns.is_empty() {
391391
// Shouldn't happen, but we're using -1 as a special index.
392-
assert!(self.dir_patterns.len() < !0 as usize);
392+
assert!(self.dir_patterns.len() < usize::MAX);
393393

394394
fill_todo(&mut self.todo, &self.dir_patterns, 0, &scope, self.options);
395395
}
@@ -407,7 +407,7 @@ impl Iterator for Paths {
407407

408408
// idx -1: was already checked by fill_todo, maybe path was '.' or
409409
// '..' that we can't match here because of normalization.
410-
if idx == !0 as usize {
410+
if idx == usize::MAX {
411411
if self.require_dir && !path.is_directory {
412412
continue;
413413
}
@@ -890,7 +890,7 @@ fn fill_todo(
890890
// We know it's good, so don't make the iterator match this path
891891
// against the pattern again. In particular, it can't match
892892
// . or .. globs since these never show up as path components.
893-
todo.push(Ok((next_path, !0 as usize)));
893+
todo.push(Ok((next_path, usize::MAX)));
894894
} else {
895895
fill_todo(todo, patterns, idx + 1, &next_path, options);
896896
}

0 commit comments

Comments
 (0)