diff options
author | Vincent Ambo <tazjin@tvl.su> | 2024-02-20T08·38+0700 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2024-02-20T09·18+0000 |
commit | 94f582341e4f37228fbdf0997255d6374264b4b3 (patch) | |
tree | a3425ba313777076559203174ba5755864b05c98 /corp | |
parent | 3c87687798a3cfb6c3cfcc231e6c60511e3341ab (diff) |
refactor(tvix/eval): use internal SourceCode field in error printers r/7572
Makes use of the SourceCode field now being stored directly in errors (see parent CL). With this change, the default `Display` implementation can now format errors correctly, and there is no need to keep a `SourceCode` around just for error formatting. Updates dependent crates (CLI, serde, tvixbolt) to use this correctly. Change-Id: Iddc5d7a6b4bab391f30a999e4c68aca34304c059 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10987 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'corp')
-rw-r--r-- | corp/tvixbolt/src/main.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/corp/tvixbolt/src/main.rs b/corp/tvixbolt/src/main.rs index 53a2d29fefc2..e8a2bc02e29f 100644 --- a/corp/tvixbolt/src/main.rs +++ b/corp/tvixbolt/src/main.rs @@ -323,12 +323,7 @@ fn eval(model: &Model) -> Output { if !result.errors.is_empty() { for error in &result.errors { - writeln!( - &mut out.errors, - "{}\n", - error.fancy_format_str(&source).trim(), - ) - .unwrap(); + writeln!(&mut out.errors, "{}\n", error.fancy_format_str().trim(),).unwrap(); } return out; |