summaryrefslogtreecommitdiffstats
path: root/src/walk.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/walk.rs')
-rw-r--r--src/walk.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/walk.rs b/src/walk.rs
index b100802a..f661c4cf 100644
--- a/src/walk.rs
+++ b/src/walk.rs
@@ -26,6 +26,7 @@ impl Iter {
}
/// Returns true if this entry should be skipped.
+ #[inline(always)]
fn skip_entry(&self, ent: &DirEntry) -> bool {
if ent.depth() == 0 {
// Never skip the root directory.
@@ -41,6 +42,7 @@ impl Iter {
impl Iterator for Iter {
type Item = DirEntry;
+ #[inline(always)]
fn next(&mut self) -> Option<DirEntry> {
while let Some(ev) = self.it.next() {
match ev {
@@ -108,6 +110,7 @@ impl From<WalkDir> for WalkEventIter {
impl Iterator for WalkEventIter {
type Item = walkdir::Result<WalkEvent>;
+ #[inline(always)]
fn next(&mut self) -> Option<walkdir::Result<WalkEvent>> {
let dent = self.next.take().or_else(|| self.it.next());
let depth = match dent {