mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
fix(cli): use contains over is in warning
(cherry picked from commit 7baefa8609)
This commit is contained in:
parent
32c1466224
commit
0258a41e15
|
|
@ -149,7 +149,7 @@ impl<'a> Interner<'a> {
|
|||
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()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue