about summary refs log tree commit diff
path: root/tvix/nix-compat/src/derivation
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-08-20T21·17+0200
committerflokli <flokli@flokli.de>2023-08-20T22·19+0000
commit4017039595fc85c02c8c313b73073220954b9f5a (patch)
treea8b7c16d54e216439c2dd081c5516e41a59bc8d0 /tvix/nix-compat/src/derivation
parent9bb3f74062eaf4c9e1d109e9a91a191c907bc1dc (diff)
refactor(tvix/nix-compat): cargo clippy r/6511
Change-Id: I1c1608a6e75e451940fe1c61dc5ace5f0e7d7752
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9111
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/derivation')
-rw-r--r--tvix/nix-compat/src/derivation/output.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/tvix/nix-compat/src/derivation/output.rs b/tvix/nix-compat/src/derivation/output.rs
index ece414a5091c..982d8222e90e 100644
--- a/tvix/nix-compat/src/derivation/output.rs
+++ b/tvix/nix-compat/src/derivation/output.rs
@@ -22,11 +22,11 @@ impl<'de> Deserialize<'de> for Output {
             path: fields
                 .get("path")
                 .ok_or(serde::de::Error::missing_field(
-                    &"`path` is missing but required for outputs",
+                    "`path` is missing but required for outputs",
                 ))?
                 .as_str()
                 .ok_or(serde::de::Error::invalid_type(
-                    serde::de::Unexpected::Other(&"certainly not a string"),
+                    serde::de::Unexpected::Other("certainly not a string"),
                     &"a string",
                 ))?
                 .to_owned(),
@@ -67,7 +67,7 @@ fn deserialize_valid_input_addressed_output() {
     {
       "path": "/nix/store/blablabla"
     }"#;
-    let output: Output = serde_json::from_str(&json_bytes).expect("must parse");
+    let output: Output = serde_json::from_str(json_bytes).expect("must parse");
 
     assert!(!output.is_fixed());
 }
@@ -82,7 +82,7 @@ fn deserialize_valid_fixed_output() {
         "hash": "08813cbee9903c62be4c5027726a418a300da4500b2d369d3af9286f4815ceba",
         "hashAlgo": "r:sha256"
     }"#;
-    let output: Output = serde_json::from_str(&json_bytes).expect("must parse");
+    let output: Output = serde_json::from_str(json_bytes).expect("must parse");
 
     assert!(output.is_fixed());
 }
@@ -97,7 +97,7 @@ fn deserialize_with_error_invalid_hash_encoding_fixed_output() {
         "hash": "IAMNOTVALIDNIXBASE32",
         "hashAlgo": "r:sha256"
     }"#;
-    let output: Result<Output, _> = serde_json::from_str(&json_bytes);
+    let output: Result<Output, _> = serde_json::from_str(json_bytes);
 
     assert!(output.is_err());
 }
@@ -112,7 +112,7 @@ fn deserialize_with_error_invalid_hash_algo_fixed_output() {
         "hash": "08813cbee9903c62be4c5027726a418a300da4500b2d369d3af9286f4815ceba",
         "hashAlgo": "r:sha1024"
     }"#;
-    let output: Result<Output, _> = serde_json::from_str(&json_bytes);
+    let output: Result<Output, _> = serde_json::from_str(json_bytes);
 
     assert!(output.is_err());
 }
@@ -126,7 +126,7 @@ fn deserialize_with_error_missing_hash_algo_fixed_output() {
         "path": "/nix/store/blablablabla",
         "hash": "08813cbee9903c62be4c5027726a418a300da4500b2d369d3af9286f4815ceba",
     }"#;
-    let output: Result<Output, _> = serde_json::from_str(&json_bytes);
+    let output: Result<Output, _> = serde_json::from_str(json_bytes);
 
     assert!(output.is_err());
 }
@@ -140,7 +140,7 @@ fn deserialize_with_error_missing_hash_fixed_output() {
         "path": "/nix/store/blablablabla",
         "hashAlgo": "r:sha1024"
     }"#;
-    let output: Result<Output, _> = serde_json::from_str(&json_bytes);
+    let output: Result<Output, _> = serde_json::from_str(json_bytes);
 
     assert!(output.is_err());
 }