Skip to content

Commit

Permalink
Simplify the IntListQueue allocation and initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Oct 7, 2015
1 parent 9689c65 commit 00c9f54
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions queues/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,5 @@ func (q *IntListQueue) Len() int {

// NewIntListQueue returns an initialized IntListQueue.
func NewIntListQueue() *IntListQueue {
q := new(IntListQueue)
q.l = list.New()
return q
return &IntListQueue{list.New()}
}

0 comments on commit 00c9f54

Please sign in to comment.