Skip to content

Commit 6794d4b

Browse files
committed
fix matcher unwrap crash on unusual input with ASAN build
1 parent 579d8a7 commit 6794d4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/matcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<R: RegExp> Matcher<R> {
9494
Some(vec![Some(input)])
9595
}
9696
InnerMatcher::RegExp { regexp, .. } => {
97-
regexp.as_ref().unwrap().matches(input)
97+
regexp.as_ref().ok()?.matches(input)
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)