From 6b452e817090dba6c80454a42079fa5c9f83b1cd Mon Sep 17 00:00:00 2001 From: Jonas Maier Date: Sat, 6 Jun 2026 22:35:32 +0200 Subject: regex: only named matches now --- src/regex/simple.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/regex/simple.rs') diff --git a/src/regex/simple.rs b/src/regex/simple.rs index 4286322..3f0bf30 100644 --- a/src/regex/simple.rs +++ b/src/regex/simple.rs @@ -69,7 +69,7 @@ impl RegexEngine for Nothing { Pattern::Rep(_, x, Some(y), _) if y < x => Ok(Nothing), Pattern::Rep(_, 0, None, _) => Err(NotASimpleNothing), Pattern::Rep(pat, _gt_0, _, _) => Self::compile(*pat), - Pattern::Submatch(pat) => Self::compile(*pat), + Pattern::Submatch(_, pat) => Self::compile(*pat), _ => Err(NotASimpleNothing), } } @@ -109,7 +109,7 @@ fn ce(pat: Pattern) -> Option> { None } } - Pattern::Submatch(_) => None, // TODO: submatches could be stored as constant offsets + Pattern::Submatch(_, _) => None, // TODO: submatches could be stored as constant offsets Pattern::Nothing => Some(Vec::new()), _ => None, } -- cgit v1.2.3