StatResult::Path -> Dir

This commit is contained in:
Ben S 2015-05-21 16:09:16 +01:00
parent c3b7757e8e
commit 31ce5b27ab

View File

@ -69,7 +69,7 @@ impl<'dir> Exa<'dir> {
// Communication between consumer thread and producer threads // Communication between consumer thread and producer threads
enum StatResult<'dir> { enum StatResult<'dir> {
File(File<'dir>), File(File<'dir>),
Path(PathBuf), Dir(PathBuf),
Error Error
} }
@ -86,7 +86,7 @@ impl<'dir> Exa<'dir> {
match results_rx.recv() { match results_rx.recv() {
Ok(result) => match result { Ok(result) => match result {
StatResult::File(file) => self.files.push(file), StatResult::File(file) => self.files.push(file),
StatResult::Path(path) => self.dirs.push(path), StatResult::Dir(path) => self.dirs.push(path),
StatResult::Error => () StatResult::Error => ()
}, },
Err(_) => unreachable!(), Err(_) => unreachable!(),
@ -114,7 +114,7 @@ impl<'dir> Exa<'dir> {
StatResult::File(File::with_metadata(metadata, &path, None, true)) StatResult::File(File::with_metadata(metadata, &path, None, true))
} }
else { else {
StatResult::Path(path.to_path_buf()) StatResult::Dir(path.to_path_buf())
} }
} }
Err(e) => { Err(e) => {