diff options
author | Florian Klink <flokli@flokli.de> | 2023-08-19T15·20+0200 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-08-20T21·51+0000 |
commit | 1f02dc7ebae40eb9e6f47c68d4469ca8409e418e (patch) | |
tree | 65153ffbc5b5d20e0af5fba1bb5247a6da8546b7 /tvix/eval | |
parent | 690884426bc1809683b2f57c6c18b88163c87363 (diff) |
refactor(tvix/eval): cargo clippy &GenCo r/6502
Change-Id: I6b1b902ccbc12bf2acdb0fdf406d6ef336ff0b2f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9098 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/src/value/attrs.rs | 8 | ||||
-rw-r--r-- | tvix/eval/src/value/json.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs index 5ec5b8ccc77c..e4840cc88c13 100644 --- a/tvix/eval/src/value/attrs.rs +++ b/tvix/eval/src/value/attrs.rs @@ -379,19 +379,19 @@ impl NixAttrs { /// attribute to a string. pub(crate) async fn try_to_string(&self, co: &GenCo, kind: CoercionKind) -> Option<NixString> { if let Some(to_string) = self.select("__toString") { - let callable = generators::request_force(&co, to_string.clone()).await; + let callable = generators::request_force(co, to_string.clone()).await; // Leave the attribute set on the stack as an argument // to the function call. - generators::request_stack_push(&co, Value::Attrs(Box::new(self.clone()))).await; + generators::request_stack_push(co, Value::Attrs(Box::new(self.clone()))).await; // Call the callable ... - let result = generators::request_call(&co, callable).await; + let result = generators::request_call(co, callable).await; // Recurse on the result, as attribute set coercion // actually works recursively, e.g. you can even return // /another/ set with a __toString attr. - let s = generators::request_string_coerce(&co, result, kind).await; + let s = generators::request_string_coerce(co, result, kind).await; return Some(s); } diff --git a/tvix/eval/src/value/json.rs b/tvix/eval/src/value/json.rs index aa5ebe32f4d0..38496f8f35f8 100644 --- a/tvix/eval/src/value/json.rs +++ b/tvix/eval/src/value/json.rs @@ -41,7 +41,7 @@ impl Value { // Attribute sets with a callable `__toString` attribute // serialise to the string-coerced version of the result of // calling that. - if let Some(s) = attrs.try_to_string(&co, CoercionKind::Weak).await { + if let Some(s) = attrs.try_to_string(co, CoercionKind::Weak).await { return Ok(Json::String(s.as_str().to_string())); } |