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:
parent
4fba57c2c9
commit
12f9b95a2c
2 changed files with 15 additions and 7 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue