summaryrefslogtreecommitdiffstats
path: root/src/search/entry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/search/entry.rs')
-rw-r--r--src/search/entry.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/search/entry.rs b/src/search/entry.rs
index 6cd601c..9e58962 100644
--- a/src/search/entry.rs
+++ b/src/search/entry.rs
@@ -2,21 +2,18 @@ use ignore::{Walk, WalkBuilder};
use tracing::error;
use crate::{
+ config::Entry,
project::{path::PathMatcher, ProjectParser, ProjectParserGroup},
search::ProjectItem,
};
-pub use config::Config;
-
-mod config;
-
-pub struct Entry {
+pub struct EntryIter {
parsers: ProjectParserGroup,
iter: Walk,
}
-impl Entry {
- fn new(config: &Config) -> Self {
+impl EntryIter {
+ fn new(config: &Entry) -> Self {
let iter = WalkBuilder::new(&config.path_buf)
.standard_filters(true)
.max_depth(config.max_depth)
@@ -38,13 +35,13 @@ impl Entry {
}
}
-impl From<Config> for Entry {
- fn from(config: Config) -> Self {
+impl From<Entry> for EntryIter {
+ fn from(config: Entry) -> Self {
Self::new(&config)
}
}
-impl Iterator for Entry {
+impl Iterator for EntryIter {
type Item = ProjectItem;
fn next(&mut self) -> Option<Self::Item> {