Skip to content

Commit

Permalink
fix: linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Aug 26, 2023
1 parent 525b162 commit 6a72af6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions util/linkedlist/linkedlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ func (l *LinkedList[T]) InsertBefore(data T, at *Element[T]) *Element[T] {
at.Prev = e
l.length++
return e
} else {
return l.insertValue(data, at.Prev)
}
return l.insertValue(data, at.Prev)
}

func (l *LinkedList[T]) InsertAfter(data T, at *Element[T]) *Element[T] {
Expand All @@ -102,9 +101,8 @@ func (l *LinkedList[T]) InsertAfter(data T, at *Element[T]) *Element[T] {
at.Next = e
l.length++
return e
} else {
return l.insertValue(data, at)
}
return l.insertValue(data, at)
}

// DeleteAtHead deletes the node at the head of the list.
Expand Down

0 comments on commit 6a72af6

Please sign in to comment.