Skip to content

Commit

Permalink
fix compile errors if git support is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Engelbrecht committed May 24, 2015
1 parent c3b7757 commit 5caa6dd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/feature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,19 @@ impl Attribute {
#[cfg(feature="git")] pub use self::git::Git;

#[cfg(not(feature="git"))] pub struct Git;
#[cfg(not(feature="git"))] use std::old_path::posix::Path;
#[cfg(not(feature="git"))] use std::path::Path;
#[cfg(not(feature="git"))] use file::fields;
#[cfg(not(feature="git"))]
impl Git {
pub fn scan(_: &Path) -> Result<Git, ()> {
Err(())
}

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

pub fn dir_status(&self, path: &Path) -> String {
pub fn dir_status(&self, path: &Path) -> fields::Git {
self.status(path)
}
}

0 comments on commit 5caa6dd

Please sign in to comment.