Преглед изворни кода

Add a dummy SubdirGitRepo::from_path() implementation for
--no-default-features configuration

modified: src/fs/feature/mod.rs
modified: src/fs/fields.rs

alpn пре 5 година
родитељ
комит
da3ce930f5
2 измењених фајлова са 7 додато и 0 уклоњено
  1. 6 0
      src/fs/feature/mod.rs
  2. 1 0
      src/fs/fields.rs

+ 6 - 0
src/fs/feature/mod.rs

@@ -30,4 +30,10 @@ pub mod git {
             panic!("Tried to query a Git cache, but Git support is disabled")
             panic!("Tried to query a Git cache, but Git support is disabled")
         }
         }
     }
     }
+
+    impl f::SubdirGitRepo{
+        pub fn from_path(_dir : &Path) -> Self{
+            Self{status : f::SubdirGitRepoStatus::NotRepo}
+        }
+    }
 }
 }

+ 1 - 0
src/fs/fields.rs

@@ -247,6 +247,7 @@ impl Default for Git {
 }
 }
 
 
 #[derive(PartialEq, Copy, Clone)]
 #[derive(PartialEq, Copy, Clone)]
+#[allow(dead_code)]
 pub enum SubdirGitRepoStatus{
 pub enum SubdirGitRepoStatus{
     NotDir,
     NotDir,
     NotRepo,
     NotRepo,