From a8ffba20f7272f2b1c5fb0ed18df97665b1971ee Mon Sep 17 00:00:00 2001 From: alexchao26 Date: Thu, 30 Dec 2021 19:21:13 -0500 Subject: [PATCH] linting --- 2019/day18/part1/main.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/2019/day18/part1/main.go b/2019/day18/part1/main.go index 92c1c5a..1da9c81 100644 --- a/2019/day18/part1/main.go +++ b/2019/day18/part1/main.go @@ -112,9 +112,7 @@ func MakeDijkstraGrid(grid [][]string, startCoords [2]int) *DijkstraGrid { // distance = 0 finalGrid[startCoords[0]][startCoords[1]].distance = 0 finalGrid[startCoords[0]][startCoords[1]].seen = true - queue := [][2]int{ - [2]int{startCoords[0], startCoords[1]}, - } + queue := [][2]int{{startCoords[0], startCoords[1]}} return &DijkstraGrid{finalGrid, queue} } @@ -167,10 +165,7 @@ func (dijk *DijkstraGrid) handleFrontOfQueue() (queueIsEmpty bool) { dijk.queue = dijk.queue[1:] // if queue is empty, there are no more paths to generate, return a true - if len(dijk.queue) == 0 { - return true - } - return false + return len(dijk.queue) == 0 } /********************************************************************************************