diff options
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/Cargo.lock | 2 | ||||
-rw-r--r-- | tvix/store/src/nixpath.rs | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock index 35aeb3aa4f4c..ec6668a2d627 100644 --- a/tvix/Cargo.lock +++ b/tvix/Cargo.lock @@ -2145,8 +2145,8 @@ version = "0.1.0" dependencies = [ "anyhow", "blake3", - "data-encoding", "clap 4.0.32", + "data-encoding", "lazy_static", "prost", "prost-build", diff --git a/tvix/store/src/nixpath.rs b/tvix/store/src/nixpath.rs index 8232e3241e11..44350803eafa 100644 --- a/tvix/store/src/nixpath.rs +++ b/tvix/store/src/nixpath.rs @@ -49,13 +49,9 @@ impl NixPath { NixPath::validate_characters(&s[name_offset..])?; - // copy the digest:Vec<u8> to a [u8; PATH_HASH_SIZE] - let mut buffer: [u8; PATH_HASH_SIZE] = [0; PATH_HASH_SIZE]; - buffer[..PATH_HASH_SIZE].copy_from_slice(&digest[..PATH_HASH_SIZE]); - Ok(NixPath { name: s[name_offset..].to_string(), - digest: buffer, + digest: digest.try_into().expect("size is known"), }) } |