fix tests

This commit is contained in:
Andrew Gallant
2016-09-16 06:58:10 -04:00
parent 0e46171e3b
commit 8203a80ac7
3 changed files with 6 additions and 7 deletions

View File

@@ -124,8 +124,10 @@ impl Gitignore {
/// Like matched, but takes a path that has already been stripped.
pub fn matched_stripped(&self, path: &Path, is_dir: bool) -> Match {
thread_local! {
static MATCHES: RefCell<Vec<usize>> = RefCell::new(vec![]);
}
static MATCHES: RefCell<Vec<usize>> = {
RefCell::new(vec![])
};
};
MATCHES.with(|matches| {
let mut matches = matches.borrow_mut();
self.set.matches_into(path, &mut *matches);