summaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-08-25 11:27:08 +0100
committerBen S <ogham@bsago.me>2015-08-25 11:27:08 +0100
commit5d0bd371687610a627656a9002520564d9943c47 (patch)
tree258a665a13da2843e242fa1c912f1fbf0026d585 /src/output
parentd547c3f5d788f202de353938eaaedbb67a3624df (diff)
Make Dir return an Iterator of files, not Vec
This is part of work to make the flow of files more iterator-able, rather than going in and out of vectors. Here, a Dir returns an iterator of files, rather than a pre-filled vector. For now, this removes the ability for error messages to be displayed. Will be added in later though!
Diffstat (limited to 'src/output')
-rw-r--r--src/output/details.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/details.rs b/src/output/details.rs
index f7c50b7..2a8850d 100644
--- a/src/output/details.rs
+++ b/src/output/details.rs
@@ -99,7 +99,8 @@ impl Details {
// them, so we don't examine any directories that wouldn't
// have their contents listed anyway.
if let Some(ref dir) = file.this {
- let mut files = dir.files(true);
+ let mut files = dir.files(true).flat_map(|f| f).collect();
+
filter.transform_files(&mut files);
self.add_files_to_table(table, &files, depth + 1);
}