Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ pub struct FilteredIterator {
}

impl FilteredIterator {
// I have no idea why this is considered dead_code by rustc.
#[allow(dead_code)]
pub fn new(iterator: FileIterator) -> Self {
FilteredIterator {
source: iterator,
Expand All @@ -19,6 +21,8 @@ impl FilteredIterator {
}
}

// I have no idea why this is considered dead_code by rustc.
#[allow(dead_code)]
pub fn skip_filter(&mut self) {
self.skip = true;
}
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl DirEntrySummary {
}

#[cfg(not(target_os = "linux"))]
fn is_executable(metadata: &Metadata) -> bool {
fn is_executable(_metadata: &Metadata) -> bool {
false
}

Expand Down Expand Up @@ -177,6 +177,9 @@ impl<'a, T: Terminal<Output = W>, W: std::io::Write> TreePrinter<'a, T, W> {
list
}

/// # Errors
///
/// Will return an error if printing to the terminal fails.
pub fn iterate_folders(&mut self, path: &Path) -> io::Result<DirEntrySummary> {
let mut summary = DirEntrySummary::new();

Expand Down
2 changes: 2 additions & 0 deletions src/pathiterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ fn get_sorted_dir_entries(path: &Path) -> io::Result<Vec<DirEntry>> {
}

impl FileIterator {
// I have no idea why this is considered dead_code by rustc.
#[allow(dead_code)]
pub fn new(path: &Path, config: FileIteratorConfig) -> FileIterator {
let mut queue = VecDeque::new();
queue.push_back(IteratorItem::new(path, 0, true));
Expand Down