From cd65d4861951e88626a18e8dff667741b016cb05 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Thu, 8 Feb 2024 08:40:47 -0800 Subject: [PATCH] Silence a clippy warning --- src/parse/tree_sitter_parser.rs | 13 ++++--------- 1 file 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, .. } => { // . 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");