From 98413eb1b7cc942e97e6af8f7a40ed5a1680c81e Mon Sep 17 00:00:00 2001 From: electria Date: Thu, 18 Jun 2026 18:57:58 -0700 Subject: [PATCH] test(parse): create a slice directly --- src/parse.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/parse.rs b/src/parse.rs index 26c4aa5..dd75844 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -150,14 +150,13 @@ fn nodes_from_str(s: &str) -> Result, Error> { fn test_nodes_from_str() { assert_eq!( nodes_from_str("sin(2) + 1").unwrap().as_slice(), - vec![ + &[ Node::Function(Function::Sine), Node::ParenthesisStart, Node::Number(Float::with_val(512, 2)), Node::ParenthesisEnd, Node::Operator(Operator::Plus), Node::Number(Float::with_val(512, 1)) - ] - .as_slice(), + ], ) }