aboutsummaryrefslogtreecommitdiffstats
path: root/src/project/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/project/path.rs')
-rw-r--r--src/project/path.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/project/path.rs b/src/project/path.rs
deleted file mode 100644
index 0e38990..0000000
--- a/src/project/path.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-use std::{io::ErrorKind, path::PathBuf};
-
-use super::{Project, ProjectParser};
-
-#[derive(Debug, Clone)]
-pub enum PathMatcher {
- All,
- Pattern(String),
-}
-
-impl ProjectParser for PathMatcher {
- #[tracing::instrument]
- fn parse(&self, path_buf: PathBuf) -> Result<Project, Box<dyn std::error::Error>> {
- let project = match self {
- PathMatcher::All => path_buf.try_into()?,
- PathMatcher::Pattern(p) if path_buf.join(p).exists() => path_buf.try_into()?,
- _ => return Err(Box::new(std::io::Error::from(ErrorKind::NotFound))),
- };
-
- Ok(project)
- }
-}