diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/config.rs b/src/config.rs index 677b202..126b939 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,10 +1,11 @@ -use super::SearchPath; use figment::{providers::Serialized, value, Figment, Metadata, Profile, Provider}; use serde::{Deserialize, Serialize}; +use crate::search; + #[derive(Debug, PartialEq, Eq, Clone, Default, Serialize, Deserialize)] pub struct Config { - pub(crate) paths: Vec<SearchPath>, + pub(crate) paths: Vec<search::entry::Config>, } impl Config { @@ -57,20 +58,23 @@ mod tests { config, Config { paths: Vec::from([ - SearchPath { - path: "/path/to/projects".into(), + search::entry::Config { + path_buf: "/path/to/projects".into(), hidden: false, max_depth: None, + ..Default::default() }, - SearchPath { - path: "/path/to/other_projects".into(), + search::entry::Config { + path_buf: "/path/to/other_projects".into(), hidden: true, max_depth: Some(1), + ..Default::default() }, - SearchPath { - path: "/path/to/another_project".into(), + search::entry::Config { + path_buf: "/path/to/another_project".into(), hidden: false, max_depth: Some(0), + ..Default::default() }, ]), } |