From 340242174debb0240f642733848688c211532558 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 9 Dec 2023 13:18:31 +0200 Subject: [PATCH] refactor(nix-compat/aterm): address clippy This pushes to a Vec immediately after creation. Change-Id: I2360b45810475d98ededc1d097fb4cbdeabc576b Reviewed-on: https://cl.tvl.fyi/c/depot/+/10232 Reviewed-by: tazjin Tested-by: BuildkiteCI Autosubmit: flokli --- tvix/nix-compat/src/aterm/parser.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tvix/nix-compat/src/aterm/parser.rs b/tvix/nix-compat/src/aterm/parser.rs index 883eeb60b..d76afb061 100644 --- a/tvix/nix-compat/src/aterm/parser.rs +++ b/tvix/nix-compat/src/aterm/parser.rs @@ -102,12 +102,7 @@ mod tests { #[test] fn parse_string_field_invalid_encoding_fail() { - let mut input: Vec = Vec::new(); - input.push(b'"'); - input.push(0xc5); - input.push(0xc4); - input.push(0xd6); - input.push(b'"'); + let input: Vec<_> = vec![b'"', 0xc5, 0xc4, 0xd6, b'"']; super::parse_string_field(&input).expect_err("must fail"); }