fix(cli): use contains over is in warning

This commit is contained in:
Amaan Qureshi 2024-11-02 01:31:16 -04:00
parent e892862c6c
commit 7baefa8609

View file

@ -149,7 +149,7 @@ impl Interner<'_> {
fn check_single(&self, elements: &[Rule], name: Option<&str>) {
if elements.len() == 1 && matches!(elements[0], Rule::String(_) | Rule::Pattern(_, _)) {
eprintln!(
"Warning: rule {} is just a `seq` or `choice` rule with a single element. This is unnecessary.",
"Warning: rule {} contains a `seq` or `choice` rule with a single element. This is unnecessary.",
name.unwrap_or_default()
);
}