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 <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2023-12-09 13:18:31 +02:00 committed by clbot
parent f9ff4fe969
commit 340242174d

View file

@ -102,12 +102,7 @@ mod tests {
#[test]
fn parse_string_field_invalid_encoding_fail() {
let mut input: Vec<u8> = 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");
}