Peter H. Froehlich %!s(int64=8) %!d(string=hai) anos
pai
achega
ab0ff611a6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      queue/queue.go

+ 2 - 2
queue/queue.go

@@ -89,14 +89,14 @@ func (q *Queue) resize(size int) {
 // lazyGrow grows the underlying slice if necessary.
 // lazyGrow grows the underlying slice if necessary.
 func (q *Queue) lazyGrow() {
 func (q *Queue) lazyGrow() {
 	if q.full() {
 	if q.full() {
-		q.resize(len(q.rep)*2)
+		q.resize(len(q.rep) * 2)
 	}
 	}
 }
 }
 
 
 // lazyShrink shrinks the underlying slice if advisable.
 // lazyShrink shrinks the underlying slice if advisable.
 func (q *Queue) lazyShrink() {
 func (q *Queue) lazyShrink() {
 	if q.sparse() {
 	if q.sparse() {
-		q.resize(len(q.rep)/2)
+		q.resize(len(q.rep) / 2)
 	}
 	}
 }
 }