diff options
author | Ilan Joselevich <personal@ilanjoselevich.com> | 2024-03-26T22·25+0200 |
---|---|---|
committer | Ilan Joselevich <personal@ilanjoselevich.com> | 2024-03-27T12·36+0000 |
commit | ac88c52be301c0173f595a06a5685b26451c8573 (patch) | |
tree | a0b23c78d4a61037da733a26594d296f3e58efbc /tvix/nix-compat/src/store_path/mod.rs | |
parent | 21481b02b872900b881c2c489e085e44f1b90b0f (diff) |
feat(tvix/nix-compat/store_path): derive Hash for StorePathRef r/7785
This allows StorePathRef as keys in a hashmap, by deriving Hash. The same is already done for StorePath. Change-Id: I3fc54c45787948116dcb27dfb5dc806b9b505835 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11269 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/store_path/mod.rs')
-rw-r--r-- | tvix/nix-compat/src/store_path/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/nix-compat/src/store_path/mod.rs b/tvix/nix-compat/src/store_path/mod.rs index 3638ce6e87df..71b7bdcc740c 100644 --- a/tvix/nix-compat/src/store_path/mod.rs +++ b/tvix/nix-compat/src/store_path/mod.rs @@ -183,7 +183,7 @@ impl Serialize for StorePath { /// Like [StorePath], but without a heap allocation for the name. /// Used by [StorePath] for parsing. /// -#[derive(Debug, Eq, PartialEq, Clone, Copy)] +#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)] pub struct StorePathRef<'a> { digest: [u8; DIGEST_SIZE], name: &'a str, |