Created
August 27, 2014 07:37
-
-
Save shadowmint/402960439b81a797c0a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<'a> Iterator<Path> for GlobIter<'a> { | |
fn next(&mut self) -> Option<Path> { | |
match self.walker { | |
Some(ref mut walker) => { | |
let mut ended = false; | |
while !ended { | |
match walker.next() { | |
Some(v) => { | |
match v.lstat() { | |
Ok(stats) => { | |
if self.parent.matches(&v, &stats) { | |
return Some(v); | |
} | |
}, | |
_ => {} | |
} | |
}, | |
None => { ended = true; } | |
} | |
} | |
}, | |
None => { return None; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment