@@ -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( ) < std :: 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 == std :: 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, std :: usize:: MAX ) ) ) ;
894894 } else {
895895 fill_todo ( todo, patterns, idx + 1 , & next_path, options) ;
896896 }
0 commit comments