Skip to content

Commit

Permalink
chore(pattern): Small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 13, 2024
1 parent d624f9c commit 0a88579
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/pattern/plaintext.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ func UnmarshalPlaintext(r io.Reader) ([][]int, error) {
tiles = append(tiles, tileLine)
}
for i := range tiles {
diff := largest - len(tiles[i])
if diff > 0 {
tiles[i] = append(tiles[i], make([]int, largest-len(tiles[i]))...)
if diff := largest - len(tiles[i]); diff > 0 {
tiles[i] = append(tiles[i], make([]int, diff)...)
}
}
if scanner.Err() != nil {
Expand Down

0 comments on commit 0a88579

Please sign in to comment.