summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-11-27 20:08:52 -0600
committerToby Vincent <tobyv13@gmail.com>2022-11-27 20:08:52 -0600
commitefc8b853e67557de2d5ae23ea32df661405c07ad (patch)
tree3ef6d74df181e047b9a24a93f685234765eea820
parentc664b588518e12de901bfe4a8ba2242893e4ff3d (diff)
refactor: replace explicit types with type alias
-rw-r--r--src/search/entry.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/search/entry.rs b/src/search/entry.rs
index 1ac20fc..776886b 100644
--- a/src/search/entry.rs
+++ b/src/search/entry.rs
@@ -1,10 +1,7 @@
use ignore::{DirEntry, Walk};
use tracing::error;
-use crate::{
- project::{GitProject, PathProject, ProjectItem},
- Project,
-};
+use crate::project::{GitProject, PathProject, ProjectItem};
pub use config::Config;
@@ -24,10 +21,7 @@ impl std::fmt::Debug for Entry {
}
impl Entry {
- pub fn parse_dir_entry(
- &self,
- dir_entry: DirEntry,
- ) -> Option<Box<dyn Project<Error = crate::project::Error>>> {
+ pub fn parse_dir_entry(&self, dir_entry: DirEntry) -> Option<ProjectItem> {
if self.config.git {
if let Ok(git) = GitProject::try_from(dir_entry.to_owned()) {
return Some(Box::new(git));