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/castore/src/fixtures.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/castore/src/fixtures.rs')
-rw-r--r-- | tvix/castore/src/fixtures.rs | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tvix/castore/src/fixtures.rs b/tvix/castore/src/fixtures.rs index ed3d1ca6e855..a206d9b7ddc6 100644 --- a/tvix/castore/src/fixtures.rs +++ b/tvix/castore/src/fixtures.rs @@ -9,20 +9,13 @@ pub const EMPTY_BLOB_CONTENTS: &[u8] = b""; lazy_static! { pub static ref DUMMY_DIGEST: B3Digest = { - let u: &[u8; 32] = &[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, - ]; - u.into() + let u = [0u8; 32]; + (&u).into() }; pub static ref DUMMY_DIGEST_2: B3Digest = { - let u: &[u8; 32] = &[ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - ]; - u.into() + let mut u = [0u8; 32]; + u[0] = 0x10; + (&u).into() }; pub static ref DUMMY_DATA_1: bytes::Bytes = vec![0x01, 0x02, 0x03].into(); pub static ref DUMMY_DATA_2: bytes::Bytes = vec![0x04, 0x05].into(); |