From 71e8bec7f80d397f974c738404320db4afcd6942 Mon Sep 17 00:00:00 2001 From: Ludwig Stecher Date: Sat, 21 Dec 2024 22:23:54 +0100 Subject: [PATCH] fix: intersection check --- pomsky-lib/src/exprs/char_class/char_set_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pomsky-lib/src/exprs/char_class/char_set_item.rs b/pomsky-lib/src/exprs/char_class/char_set_item.rs index b45c02b..221a9cd 100644 --- a/pomsky-lib/src/exprs/char_class/char_set_item.rs +++ b/pomsky-lib/src/exprs/char_class/char_set_item.rs @@ -42,7 +42,7 @@ impl RegexCompoundCharSet { } fn may_intersect(&self, other: &RegexCharSet) -> bool { - self.intersections.iter().any(|set| set.may_intersect(other)) + self.intersections.iter().all(|set| set.may_intersect(other)) } pub(crate) fn codegen(&self, buf: &mut String, flavor: RegexFlavor) {