diff options
author | Toby Vincent <tobyv13@gmail.com> | 2022-11-30 03:11:38 -0600 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2022-11-30 03:11:38 -0600 |
commit | 47fe04dfb634eba3c24403013cf92960237cf761 (patch) | |
tree | c3fc4e3f8a480af8fb9020e000cdc391c840eaa2 /src/search/entry.rs | |
parent | fa956cc1598f69c81d6db54b4e2e8f5f35cd9b23 (diff) |
revert: remove figment from the lib (moved to bin)
Diffstat (limited to 'src/search/entry.rs')
-rw-r--r-- | src/search/entry.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/search/entry.rs b/src/search/entry.rs index 9e58962..eb845e1 100644 --- a/src/search/entry.rs +++ b/src/search/entry.rs @@ -2,18 +2,18 @@ use ignore::{Walk, WalkBuilder}; use tracing::error; use crate::{ - config::Entry, + config::SearchEntryConfig, project::{path::PathMatcher, ProjectParser, ProjectParserGroup}, search::ProjectItem, }; -pub struct EntryIter { +pub struct SearchEntry { parsers: ProjectParserGroup, iter: Walk, } -impl EntryIter { - fn new(config: &Entry) -> Self { +impl SearchEntry { + fn new(config: &SearchEntryConfig) -> Self { let iter = WalkBuilder::new(&config.path_buf) .standard_filters(true) .max_depth(config.max_depth) @@ -35,13 +35,13 @@ impl EntryIter { } } -impl From<Entry> for EntryIter { - fn from(config: Entry) -> Self { +impl From<SearchEntryConfig> for SearchEntry { + fn from(config: SearchEntryConfig) -> Self { Self::new(&config) } } -impl Iterator for EntryIter { +impl Iterator for SearchEntry { type Item = ProjectItem; fn next(&mut self) -> Option<Self::Item> { |