summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2024-02-08 08:40:47 -0800
committerWilfred Hughes <me@wilfred.me.uk>2024-02-08 08:40:47 -0800
commitcd65d4861951e88626a18e8dff667741b016cb05 (patch)
tree22de3bc2596cbe2b863356fa8fbaaf6090fd7ac6
parent4146067be14755c80ca9aef281c9a6ca53f58ba9 (diff)
Silence a clippy warning
-rw-r--r--src/parse/tree_sitter_parser.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/parse/tree_sitter_parser.rs b/src/parse/tree_sitter_parser.rs
index e59aa1be1..e89e925c8 100644
--- a/src/parse/tree_sitter_parser.rs
+++ b/src/parse/tree_sitter_parser.rs
@@ -1837,15 +1837,10 @@ mod tests {
Syntax::List { children, .. } => {
// <style>, content, </style>.
assert_eq!(children.len(), 3);
- match children[1] {
- Syntax::Atom { .. } => {
- panic!("Style contents is parsed as a single atom");
- }
- _ => {
- // A list is what we want; it shows that the CSS was parsed
- // into multiple tokens, so we do not check it further.
- }
- }
+
+ // A list is what we want; it shows that the CSS was parsed
+ // into multiple tokens, so we do not check it further.
+ assert!(matches!(children[1], Syntax::List { .. }));
}
_ => {
panic!("Top level isn't a list");