diff options
author | Florian Klink <flokli@flokli.de> | 2023-12-09T11·18+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-09T12·58+0000 |
commit | 340242174debb0240f642733848688c211532558 (patch) | |
tree | 35d6aa2d1996f04652e9a6a06af72aa4dbc33d89 | |
parent | f9ff4fe96903ba69999da02157791814816fd6d8 (diff) |
refactor(nix-compat/aterm): address clippy r/7139
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>
-rw-r--r-- | tvix/nix-compat/src/aterm/parser.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tvix/nix-compat/src/aterm/parser.rs b/tvix/nix-compat/src/aterm/parser.rs index 883eeb60b984..d76afb0616e6 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<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"); } |