提交 5caa6dd9 编写于 作者: M Markus Engelbrecht

fix compile errors if git support is disabled

上级 c3b7757e
......@@ -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)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册