diff options
author | edef <edef@edef.eu> | 2023-10-27T01·12+0000 |
---|---|---|
committer | edef <edef@edef.eu> | 2023-10-27T07·37+0000 |
commit | 6a0a75c8e11aaf8dc8c3114eee354be34b7be16d (patch) | |
tree | d7d928428c71b2e3f47d8f00aa7575a583a5c791 /tvix/nix-compat/src/store_path/mod.rs | |
parent | 55c37a2871404e55aa2cb9e864dcfe389ac6015f (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.rs | 6 |
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 9253b2a8d741..e75d900ce006 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); |