Skip to content

Commit

Permalink
Remove duplicate return position in diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
wzwywx committed Nov 2, 2023
1 parent 4e3bc18 commit de1fa94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions checker/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ mod defined_errors_and_warnings {
returned_type,
} => Diagnostic::PositionWithAdditionLabels {
reason: format!(
"Function is expected to return {expected_return_type} but returned {returned_type} {:?}",
returned_position.clone()
"Function is expected to return {expected_return_type} but returned {returned_type}",
),
labels: vec![(
format!("The returned {returned_type} came from here."),
Expand Down

0 comments on commit de1fa94

Please sign in to comment.