mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-28 18:51:06 +00:00
StatResult::Path -> Dir
This commit is contained in:
parent
c3b7757e8e
commit
31ce5b27ab
@ -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) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user