about summary refs log tree commit diff
path: root/tvix/nix-compat/src/derivation/parser.rs
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2023-10-27T01·12+0000
committeredef <edef@edef.eu>2023-10-27T07·37+0000
commit6a0a75c8e11aaf8dc8c3114eee354be34b7be16d (patch)
treed7d928428c71b2e3f47d8f00aa7575a583a5c791 /tvix/nix-compat/src/derivation/parser.rs
parent55c37a2871404e55aa2cb9e864dcfe389ac6015f (diff)
refactor(tvix): condense long bytestrings r/6883
Change-Id: I3bea0827ec2c8db835334ce378a7bf3a39e9b1a3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9849
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat/src/derivation/parser.rs')
-rw-r--r--tvix/nix-compat/src/derivation/parser.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/tvix/nix-compat/src/derivation/parser.rs b/tvix/nix-compat/src/derivation/parser.rs
index b04187c433dc..5d7b109f80de 100644
--- a/tvix/nix-compat/src/derivation/parser.rs
+++ b/tvix/nix-compat/src/derivation/parser.rs
@@ -300,13 +300,11 @@ mod tests {
         parse_error::ErrorKind, parser::from_algo_and_mode_and_digest, CAHash, NixHash, Output,
     };
     use bstr::{BString, ByteSlice};
+    use hex_literal::hex;
     use lazy_static::lazy_static;
     use test_case::test_case;
-    const DIGEST_SHA256: [u8; 32] = [
-        0xa5, 0xce, 0x9c, 0x15, 0x5e, 0xd0, 0x93, 0x97, 0x61, 0x46, 0x46, 0xc9, 0x71, 0x7f, 0xc7,
-        0xcd, 0x94, 0xb1, 0x02, 0x3d, 0x7b, 0x76, 0xb6, 0x18, 0xd4, 0x09, 0xe4, 0xfe, 0xfd, 0x6e,
-        0x9d, 0x39,
-    ];
+    const DIGEST_SHA256: [u8; 32] =
+        hex!("a5ce9c155ed09397614646c9717fc7cd94b1023d7b76b618d409e4fefd6e9d39");
 
     lazy_static! {
         pub static ref NIXHASH_SHA256: NixHash = NixHash::Sha256(DIGEST_SHA256);