diff options
author | Benjamin Sago <ogham@bsago.me> | 2017-09-14 11:33:24 +0100 |
---|---|---|
committer | Benjamin Sago <ogham@bsago.me> | 2017-09-14 11:33:24 +0100 |
commit | 4819c4721b3485b8a7d79871c8de1ff817f964d4 (patch) | |
tree | c7d499a8eb6b9bdc420b0a54b6ac054c237e0e2b | |
parent | f55bd6de5351007325df504f9efdf1d7183059d5 (diff) |
Fix compile error with --no-default-features
Fixes #283. Also, have Travis compile without default features either, so I get warned the next time I break it.
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | src/fs/feature/mod.rs | 18 |
2 files changed, 8 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml index 843594e..917b2d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,6 @@ rust: - stable script: - cargo build --verbose - - cargo test --verbose + - cargo test --verbose + - cargo build --verbose --no-default-features + - cargo test --verbose --no-default-features diff --git a/src/fs/feature/mod.rs b/src/fs/feature/mod.rs index e2f5d0c..988ec1f 100644 --- a/src/fs/feature/mod.rs +++ b/src/fs/feature/mod.rs @@ -10,7 +10,7 @@ pub mod git { use std::iter::FromIterator; use std::path::{Path, PathBuf}; - use fs::fields; + use fs::fields as f; pub struct GitCache; @@ -22,20 +22,12 @@ pub mod git { } impl GitCache { - pub fn get(&self, _index: &Path) -> Option<Git> { - panic!("Tried to query a Git cache, but Git support is disabled") - } - } - - pub struct Git; - - impl Git { - pub fn status(&self, _: &Path) -> fields::Git { - panic!("Tried to get a Git status, but Git support is disabled") + pub fn has_anything_for(&self, _index: &Path) -> bool { + false } - pub fn dir_status(&self, path: &Path) -> fields::Git { - self.status(path) + pub fn get(&self, _index: &Path, _prefix_lookup: bool) -> f::Git { + panic!("Tried to query a Git cache, but Git support is disabled") } } } |