From 365937cd08879098f53edcf42695271deaccfb23 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 29 May 2023 15:00:13 +0300 Subject: feat(tvix/nix-compat): derive Hash 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 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/nix-compat/src/store_path/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/nix-compat/src') 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 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, -- cgit 1.4.1