checker: add missing check for ref passing to non-ref (#22194)

This commit is contained in:
Felipe Pena 2024-09-14 17:13:25 -03:00 committed by GitHub
parent 469a532caa
commit 4eb087a347
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 54 additions and 14 deletions

View file

@ -329,7 +329,7 @@ fn astar_path_finding(mut app App, mut grid [][]Cell, start Point, end Point) {
g_score[start.x][start.y] = 0
f_score[start.x][start.y] = g_score[start.x][start.y] + hf(start, end)
priority_queue.insert(&Node{
priority_queue.insert(Node{
f_score: f_score[start.x][start.y]
cell: &Point{
x: start.x
@ -360,7 +360,7 @@ fn astar_path_finding(mut app App, mut grid [][]Cell, start Point, end Point) {
if temp_g_score < g_score[neighbor.x][neighbor.y] {
g_score[neighbor.x][neighbor.y] = temp_g_score
if !(neighbor.x == start.x && neighbor.y == start.y) {
priority_queue.insert(&Node{
priority_queue.insert(Node{
f_score: g_score[neighbor.x][neighbor.y] + hf(neighbor, end)
cell: neighbor
count: curr_node.count + 1