Skip to content

Commit 5caa6dd

Browse files
author
Markus Engelbrecht
committed
fix compile errors if git support is disabled
1 parent c3b7757 commit 5caa6dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/feature/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,19 @@ impl Attribute {
4545
#[cfg(feature="git")] pub use self::git::Git;
4646

4747
#[cfg(not(feature="git"))] pub struct Git;
48-
#[cfg(not(feature="git"))] use std::old_path::posix::Path;
48+
#[cfg(not(feature="git"))] use std::path::Path;
49+
#[cfg(not(feature="git"))] use file::fields;
4950
#[cfg(not(feature="git"))]
5051
impl Git {
5152
pub fn scan(_: &Path) -> Result<Git, ()> {
5253
Err(())
5354
}
5455

55-
pub fn status(&self, _: &Path) -> String {
56+
pub fn status(&self, _: &Path) -> fields::Git {
5657
panic!("Tried to access a Git repo without Git support!");
5758
}
5859

59-
pub fn dir_status(&self, path: &Path) -> String {
60+
pub fn dir_status(&self, path: &Path) -> fields::Git {
6061
self.status(path)
6162
}
6263
}

0 commit comments

Comments
 (0)