diff options
Diffstat (limited to 'src/search/entry.rs')
-rw-r--r-- | src/search/entry.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/search/entry.rs b/src/search/entry.rs index 6e94b35..ab9da38 100644 --- a/src/search/entry.rs +++ b/src/search/entry.rs @@ -24,7 +24,10 @@ impl std::fmt::Debug for Entry { } impl Entry { - pub fn match_project(&self, dir_entry: DirEntry) -> Option<Box<dyn Project>> { + pub fn parse_dir_entry( + &self, + dir_entry: DirEntry, + ) -> Option<Box<dyn Project<Error = crate::project::Error>>> { if self.config.git { if let Ok(git) = GitProject::try_from(dir_entry.to_owned()) { return Some(Box::new(git)); @@ -42,12 +45,12 @@ impl Entry { } impl Iterator for Entry { - type Item = Box<dyn Project>; + type Item = Box<dyn Project<Error = crate::project::Error>>; #[tracing::instrument] fn next(&mut self) -> Option<Self::Item> { match self.iter.next()? { - Ok(dir_entry) => self.match_project(dir_entry), + Ok(dir_entry) => self.parse_dir_entry(dir_entry), Err(err) => { error!(%err, "Ignoring errored path"); self.next() |