@@ -389,7 +389,7 @@ impl Iterator for Paths {
389
389
if let Some ( scope) = self . scope . take ( ) {
390
390
if !self . dir_patterns . is_empty ( ) {
391
391
// 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 ) ;
393
393
394
394
fill_todo ( & mut self . todo , & self . dir_patterns , 0 , & scope, self . options ) ;
395
395
}
@@ -407,7 +407,7 @@ impl Iterator for Paths {
407
407
408
408
// idx -1: was already checked by fill_todo, maybe path was '.' or
409
409
// '..' that we can't match here because of normalization.
410
- if idx == ! 0 as usize {
410
+ if idx == usize:: MAX {
411
411
if self . require_dir && !path. is_directory {
412
412
continue ;
413
413
}
@@ -890,7 +890,7 @@ fn fill_todo(
890
890
// We know it's good, so don't make the iterator match this path
891
891
// against the pattern again. In particular, it can't match
892
892
// . 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 ) ) ) ;
894
894
} else {
895
895
fill_todo ( todo, patterns, idx + 1 , & next_path, options) ;
896
896
}
0 commit comments