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 Oct 21, 2023
1 parent b49d27c commit 2f391d5
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 @@ -439,8 +439,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 2f391d5

Please sign in to comment.