mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-05 20:37:52 +00:00
Merge pull request #66 from mgee/fix-compilation-without-git-support
fix compile errors if git support is disabled
This commit is contained in:
commit
597baf7f74
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user