about summary refs log tree commit diff
path: root/tvix/nix-compat/src/store_path/mod.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/store_path/mod.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/store_path/mod.rs')
-rw-r--r--tvix/nix-compat/src/store_path/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/tvix/nix-compat/src/store_path/mod.rs b/tvix/nix-compat/src/store_path/mod.rs
index 9253b2a8d7..e75d900ce0 100644
--- a/tvix/nix-compat/src/store_path/mod.rs
+++ b/tvix/nix-compat/src/store_path/mod.rs
@@ -210,6 +210,7 @@ mod tests {
 
     use crate::nixbase32;
     use crate::store_path::{DIGEST_SIZE, ENCODED_DIGEST_SIZE};
+    use hex_literal::hex;
     use test_case::test_case;
 
     use super::{Error, StorePath};
@@ -226,10 +227,7 @@ mod tests {
         let nixpath = StorePath::from_bytes(example_nix_path_str.as_bytes())
             .expect("Error parsing example string");
 
-        let expected_digest: [u8; DIGEST_SIZE] = [
-            0x8a, 0x12, 0x32, 0x15, 0x22, 0xfd, 0x91, 0xef, 0xbd, 0x60, 0xeb, 0xb2, 0x48, 0x1a,
-            0xf8, 0x85, 0x80, 0xf6, 0x16, 0x00,
-        ];
+        let expected_digest: [u8; DIGEST_SIZE] = hex!("8a12321522fd91efbd60ebb2481af88580f61600");
 
         assert_eq!("net-tools-1.60_p20170221182432", nixpath.name);
         assert_eq!(nixpath.digest, expected_digest);