Matcher parser errors when empty

pull/2755/head
cyqsimon 7 months ago
parent 7cfd1e0d78
commit 075b5b288a
No known key found for this signature in database
GPG Key ID: 1D8CE2F297390D65

@ -86,6 +86,10 @@ impl FromStr for Matcher {
})
.collect_vec();
if non_empty_segments.is_empty() {
bail!(r#"Parsed an empty matcher: "{s}""#);
}
if non_empty_segments.iter().any(|seg| match seg {
Seg::Text(t) => t.contains(['$', '{', '}']),
Seg::Env(_) => false,

Loading…
Cancel
Save