]> Cypherpunks repositories - gostls13.git/commitdiff
container/heap: clarify that Remove returns the removed element
authorQais Patankar <qaisjp@gmail.com>
Sun, 19 Aug 2018 14:42:27 +0000 (15:42 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 20 Aug 2018 18:05:11 +0000 (18:05 +0000)
Change-Id: I63b59c1ca8265e9af7eb3f9210ee1d17925de891
Reviewed-on: https://go-review.googlesource.com/129779
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/container/heap/heap.go

index 67b5efcac7e3771635270011d91366069d7f37e8..1ed0da8e6a653baff97b179f47e416906671ae3f 100644 (file)
@@ -66,8 +66,8 @@ func Pop(h Interface) interface{} {
        return h.Pop()
 }
 
-// Remove removes the element at index i from the heap.
-// The complexity is O(log(n)) where n = h.Len().
+// Remove removes the element at index i from the heap and returns
+// the element. The complexity is O(log(n)) where n = h.Len().
 //
 func Remove(h Interface, i int) interface{} {
        n := h.Len() - 1