From 7a82b8036d256980f0dd14675c3b5a95031f1351 Mon Sep 17 00:00:00 2001 From: kennethloeffler Date: Tue, 23 Apr 2024 22:02:41 +0100 Subject: [PATCH] Remove DiscoveredManifest.depth --- lib/discovery/mod.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/discovery/mod.rs b/lib/discovery/mod.rs index ec585c0..a967639 100644 --- a/lib/discovery/mod.rs +++ b/lib/discovery/mod.rs @@ -43,7 +43,6 @@ where #[derive(Debug, Clone)] pub struct DiscoveredManifest { _kind: ManifestKind, - pub depth: usize, pub path: PathBuf, pub tools: HashMap, } @@ -104,7 +103,6 @@ fn search_paths(cwd: &Path, rokit_only: bool, skip_home: bool) -> Vec<(ManifestK */ pub async fn discover_all_manifests(rokit_only: bool, skip_home: bool) -> Vec { let cwd = current_dir().await; - let cwd_depth = cwd.components().count(); let found_manifest_contents = search_paths(&cwd, rokit_only, skip_home) .into_iter() @@ -127,11 +125,8 @@ pub async fn discover_all_manifests(rokit_only: bool, skip_home: bool) -> Vec AftmanManifest::parse_manifest(&contents)?.into_tools(), ManifestKind::Foreman => ForemanManifest::parse_manifest(&contents)?.into_tools(), }; - let path_depth = path.components().count(); - let depth = cwd_depth - path_depth; Some(DiscoveredManifest { _kind: kind, - depth, path, tools, })