From 1428ea4e191aa897a0a23e2c90f997f0b65aae6d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 16 Oct 2024 02:51:35 +0300 Subject: refactor(nix-compat/store_path): use AsRef Implement PartialEq/Eq ourselves instead of deriving, by proxying to name.as_ref() (and digest of course). Also implement Hash on our own, clippy doesn't like this to be derived, while Eq/PartialEq is not. Change-Id: Idbe289a23ba3bc8dabf893d4d8752792ae2778c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12744 Tested-by: BuildkiteCI Reviewed-by: edef Autosubmit: flokli --- tvix/nix-compat/src/derivation/parser.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tvix/nix-compat/src/derivation/parser.rs') diff --git a/tvix/nix-compat/src/derivation/parser.rs b/tvix/nix-compat/src/derivation/parser.rs index 8e9804157da3..a94ed2281a86 100644 --- a/tvix/nix-compat/src/derivation/parser.rs +++ b/tvix/nix-compat/src/derivation/parser.rs @@ -203,11 +203,7 @@ fn string_to_store_path<'a, 'i, S>( path_str: &'a str, ) -> Result, nom::Err>> where - S: std::cmp::Eq - + std::fmt::Display - + std::clone::Clone - + std::ops::Deref - + std::convert::From<&'a str>, + S: std::clone::Clone + AsRef + std::convert::From<&'a str>, { let path = StorePath::from_absolute_path(path_str.as_bytes()).map_err(|e: store_path::Error| { -- cgit 1.4.1