diff options
author | Florian Klink <flokli@flokli.de> | 2023-02-01T10·14+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-02-01T13·38+0000 |
commit | 361ffd7903ab129657a7dcc37654f3c077321027 (patch) | |
tree | 84bb088e3b4d5c87c2b80601542e27477bda1f6e /tvix/nix-compat/src/derivation/validate.rs | |
parent | ce4d87b12966fdeb0bd66b5f6b943bb4cde53669 (diff) |
refactor(tvix/derivation): don't create deref'd immediately ref r/5803
clippy says: > This expression creates a reference which is immediately dereferenced > by the compiler Change-Id: Ic2c093b043ebee9ae80912075083107e4d216cf1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7995 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/nix-compat/src/derivation/validate.rs')
-rw-r--r-- | tvix/nix-compat/src/derivation/validate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/derivation/validate.rs b/tvix/nix-compat/src/derivation/validate.rs index 91b24f811de4..d8dc24a92ae1 100644 --- a/tvix/nix-compat/src/derivation/validate.rs +++ b/tvix/nix-compat/src/derivation/validate.rs @@ -29,7 +29,7 @@ impl Derivation { // [StorePath] will fail the [StorePath::validate_name] check. if output_name.is_empty() || output_name == "drv" - || StorePath::validate_name(&output_name).is_err() + || StorePath::validate_name(output_name).is_err() { return Err(DerivationError::InvalidOutputName(output_name.to_string())); } @@ -86,7 +86,7 @@ impl Derivation { // [StorePath] will fail the [StorePath::validate_name] check. if output_name.is_empty() || output_name == "drv" - || StorePath::validate_name(&output_name).is_err() + || StorePath::validate_name(output_name).is_err() { return Err(DerivationError::InvalidInputDerivationOutputName( input_derivation_path.to_string(), |