diff options
author | Vincent Ambo <mail@tazj.in> | 2022-12-20T14·22+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-12-25T18·25+0000 |
commit | 71174f6626cbf100a8428ddc334681e4edfb45e6 (patch) | |
tree | 1e803137d755001700f0e900aa5173bbf43fdf3f /tvix/eval/src/errors.rs | |
parent | 67d508f2ece710714ce8abf6f7deba1fd2440487 (diff) |
fix(tvix/eval): fix current clippy warnings r/5486
It's been a while since the last time, so quite a lot of stuff has accumulated here. Change-Id: I0762827c197b30a917ff470fd8ae8f220f6ba247 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7597 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/errors.rs')
-rw-r--r-- | tvix/eval/src/errors.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 92ec7b079941..0d12f259a5b7 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -539,8 +539,8 @@ fn spans_for_parse_errors(file: &File, errors: &[rnix::parser::ParseError]) -> V span, format!( "found '{}', but expected {}", - name_for_syntax(&found), - expected_syntax(&wanted), + name_for_syntax(found), + expected_syntax(wanted), ), ) } @@ -565,7 +565,7 @@ fn spans_for_parse_errors(file: &File, errors: &[rnix::parser::ParseError]) -> V file.span, format!( "code ended unexpectedly, but wanted {}", - expected_syntax(&wanted) + expected_syntax(wanted) ), ) } @@ -580,9 +580,8 @@ fn spans_for_parse_errors(file: &File, errors: &[rnix::parser::ParseError]) -> V rnix::parser::ParseError::RecursionLimitExceeded => ( file.span, - format!( - "this code exceeds the parser's recursion limit, please report a Tvix bug" - ), + "this code exceeds the parser's recursion limit, please report a Tvix bug" + .to_string(), ), // TODO: can rnix even still throw this? it's semantic! @@ -727,7 +726,7 @@ impl Error { fn spans(&self, source: &SourceCode) -> Vec<SpanLabel> { match &self.kind { ErrorKind::ImportParseError { errors, file, .. } => { - spans_for_parse_errors(&file, errors) + spans_for_parse_errors(file, errors) } ErrorKind::ParseErrors(errors) => { |