@@ -258,7 +258,7 @@ impl Iterator for Paths {
258
258
if let Some ( scope) = self . scope . take ( ) {
259
259
if self . dir_patterns . len ( ) > 0 {
260
260
// Shouldn't happen, but we're using -1 as a special index.
261
- assert ! ( self . dir_patterns. len( ) < - 1 as usize ) ;
261
+ assert ! ( self . dir_patterns. len( ) < ! 0 as usize ) ;
262
262
263
263
fill_todo ( & mut self . todo , & self . dir_patterns ,
264
264
0 , & scope, & self . options ) ;
@@ -277,7 +277,7 @@ impl Iterator for Paths {
277
277
278
278
// idx -1: was already checked by fill_todo, maybe path was '.' or
279
279
// '..' that we can't match here because of normalization.
280
- if idx == - 1 as usize {
280
+ if idx == ! 0 as usize {
281
281
if self . require_dir && !is_dir ( & path) { continue ; }
282
282
return Some ( Ok ( path) ) ;
283
283
}
@@ -415,7 +415,7 @@ enum CharSpecifier {
415
415
CharRange ( char , char )
416
416
}
417
417
418
- #[ derive( Copy , PartialEq ) ]
418
+ #[ derive( Copy , Clone , PartialEq ) ]
419
419
enum MatchResult {
420
420
Match ,
421
421
SubPatternDoesntMatch ,
@@ -729,7 +729,7 @@ fn fill_todo(todo: &mut Vec<Result<(PathBuf, usize), GlobError>>,
729
729
// We know it's good, so don't make the iterator match this path
730
730
// against the pattern again. In particular, it can't match
731
731
// . or .. globs since these never show up as path components.
732
- todo. push ( Ok ( ( next_path, - 1 as usize ) ) ) ;
732
+ todo. push ( Ok ( ( next_path, ! 0 as usize ) ) ) ;
733
733
} else {
734
734
fill_todo ( todo, patterns, idx + 1 , & next_path, options) ;
735
735
}
0 commit comments