From b4b827a59a922030f984f24e51a878ccc3f7e9d9 Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Mon, 29 Jul 2024 12:11:30 -0500 Subject: [PATCH] move Not into _not.rs --- api/src/term/matcher.rs | 4 +++- api/src/term/matcher/_any.rs | 11 ----------- api/src/term/matcher/_not.rs | 12 ++++++++++++ 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 api/src/term/matcher/_not.rs diff --git a/api/src/term/matcher.rs b/api/src/term/matcher.rs index 2bd7b3d7..f93f44be 100644 --- a/api/src/term/matcher.rs +++ b/api/src/term/matcher.rs @@ -21,14 +21,16 @@ mod _datatype_matcher; mod _graph_name_matcher; mod _language_tag_matcher; mod _matcher_ref; +mod _not; mod _term_matcher_gn; mod _trait; -pub use _any::*; +pub use _any::Any; pub use _datatype_matcher::*; pub use _graph_name_matcher::*; pub use _language_tag_matcher::*; pub use _matcher_ref::*; +pub use _not::Not; pub use _term_matcher_gn::*; pub use _trait::*; diff --git a/api/src/term/matcher/_any.rs b/api/src/term/matcher/_any.rs index 062be0cd..e5968dda 100644 --- a/api/src/term/matcher/_any.rs +++ b/api/src/term/matcher/_any.rs @@ -11,14 +11,3 @@ impl TermMatcher for Any { true } } - -/// Matches on the inverse of the inner [`Term`] or [`GraphName`] -pub struct Not(pub M); - -impl TermMatcher for Not { - type Term = SimpleTerm<'static>; // not actually used - - fn matches(&self, term: &T2) -> bool { - !self.0.matches(term) - } -} diff --git a/api/src/term/matcher/_not.rs b/api/src/term/matcher/_not.rs new file mode 100644 index 00000000..21d03987 --- /dev/null +++ b/api/src/term/matcher/_not.rs @@ -0,0 +1,12 @@ +use super::*; + +/// Matches on the inverse of the inner [`Term`] or [`GraphName`] +pub struct Not(pub M); + +impl TermMatcher for Not { + type Term = SimpleTerm<'static>; // not actually used + + fn matches(&self, term: &T2) -> bool { + !self.0.matches(term) + } +}