about summary refs log tree commit diff
path: root/tvix/nix-compat/src/store_path/utils.rs
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2023-10-27T12·07+0000
committeredef <edef@edef.eu>2023-10-27T13·56+0000
commitc19c6c23cb2a36279ee147d335ffbe506b0f485b (patch)
treeaa527028dd580a10bea86efc14014138845f7804 /tvix/nix-compat/src/store_path/utils.rs
parentb994f692d3c02a858eacfece9e6a7d6990f46539 (diff)
feat(nix-compat/store_path): validate_name takes AsRef<[u8]> r/6891
Change-Id: I8819e2a7b63008a68f4f82035a08b960ac480dc3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9858
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/store_path/utils.rs')
-rw-r--r--tvix/nix-compat/src/store_path/utils.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/store_path/utils.rs b/tvix/nix-compat/src/store_path/utils.rs
index 94e9f106d9d5..44e4e4a59e94 100644
--- a/tvix/nix-compat/src/store_path/utils.rs
+++ b/tvix/nix-compat/src/store_path/utils.rs
@@ -166,8 +166,7 @@ fn build_store_path_from_fingerprint_parts<B: AsRef<[u8]>>(
     hash: &NixHash,
     name: B,
 ) -> Result<StorePath, Error> {
-    let name = name.as_ref();
-    let name = super::validate_name(name.as_ref())?.to_owned();
+    let name = super::validate_name(&name)?.to_owned();
 
     let digest = compress_hash(&{
         let mut h = Sha256::new();