feat(tvix/eval): accept impl AsRef<str> for code

We're also happy to consume strings, or other owned stringy types.

Change-Id: I5bead4407976134815d8f879f9f70468e6af1dc4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10476
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-12-30 21:53:33 +01:00 committed by clbot
parent 4fba57c2c9
commit 12f9b95a2c
2 changed files with 15 additions and 7 deletions

View file

@ -57,7 +57,7 @@ fn eval_test(code_path: &str, expect_success: bool) {
eval.strict = true;
eval.builtins.extend(mock_builtins::builtins());
let result = eval.evaluate(&code, Some(code_path.into()));
let result = eval.evaluate(code, Some(code_path.into()));
let failed = match result.value {
Some(Value::Catchable(_)) => true,
_ => !result.errors.is_empty(),