mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-26 14:00:51 +00:00
matchers: require Matcher to be Debug
This helps to write snapshot tests.
This commit is contained in:
parent
f3485c9efb
commit
c9b21a16be
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
#![allow(dead_code, missing_docs)]
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fmt::Debug;
|
||||
use std::iter;
|
||||
|
||||
use tracing::instrument;
|
||||
|
@ -67,7 +68,7 @@ pub enum VisitFiles {
|
|||
Set(HashSet<RepoPathComponentBuf>),
|
||||
}
|
||||
|
||||
pub trait Matcher: Sync {
|
||||
pub trait Matcher: Debug + Sync {
|
||||
fn matches(&self, file: &RepoPath) -> bool;
|
||||
fn visit(&self, dir: &RepoPath) -> Visit;
|
||||
}
|
||||
|
@ -143,6 +144,7 @@ impl Matcher for FilesMatcher {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PrefixMatcher {
|
||||
tree: RepoPathTree,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue