summaryrefslogtreecommitdiffstats
path: root/src/ignore.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ignore.rs')
-rw-r--r--src/ignore.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ignore.rs b/src/ignore.rs
index 10a81886..d784f994 100644
--- a/src/ignore.rs
+++ b/src/ignore.rs
@@ -19,6 +19,7 @@ use std::io;
use std::path::{Path, PathBuf};
use gitignore::{self, Gitignore, GitignoreBuilder, Match, Pattern};
+use pathutil::is_hidden;
use types::Types;
const IGNORE_NAMES: &'static [&'static str] = &[
@@ -377,14 +378,6 @@ impl Overrides {
}
}
-fn is_hidden<P: AsRef<Path>>(path: P) -> bool {
- if let Some(name) = path.as_ref().file_name() {
- name.to_str().map(|s| s.starts_with(".")).unwrap_or(false)
- } else {
- false
- }
-}
-
#[cfg(test)]
mod tests {
use std::path::Path;