about summary refs log tree commit diff
path: root/tvix/nix-compat/src/store_path/mod.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-05-29T12·00+0300
committerflokli <flokli@flokli.de>2023-06-10T14·54+0000
commit365937cd08879098f53edcf42695271deaccfb23 (patch)
tree3eb54c179bfda5a86d5c95f6b08afb174b1f7719 /tvix/nix-compat/src/store_path/mod.rs
parent83c1546b9ad7c85dba30cb033b31e844e2401e68 (diff)
feat(tvix/nix-compat): derive Hash r/6262
This allows using a StorePath as a key in a hashmap.

Change-Id: Id3eed623da4e1fc44a970a3982c7caa21d2495c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8666
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/store_path/mod.rs')
-rw-r--r--tvix/nix-compat/src/store_path/mod.rs2
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 a67132cb8e30..818e11b40353 100644
--- a/tvix/nix-compat/src/store_path/mod.rs
+++ b/tvix/nix-compat/src/store_path/mod.rs
@@ -53,7 +53,7 @@ impl From<NameError> for Error {
 ///
 /// A [StorePath] does not encode any additional subpath "inside" the store
 /// path.
-#[derive(Clone, Debug, PartialEq, Eq)]
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
 pub struct StorePath {
     pub digest: [u8; DIGEST_SIZE],
     pub name: String,