diff options
author | Qais Patankar <qaisjp@gmail.com> | 2018-08-19 15:42:27 +0100 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-08-20 18:05:11 +0000 |
commit | 6570ea3c60c9f3abf3051513f736dd5a972e25e2 (patch) | |
tree | 69939d0154ac8b8604c5b18a7298896317d72f3b /src/container | |
parent | edae0ff8c13d607aee3fca7fb80faa1dfc2a2944 (diff) | |
download | go-6570ea3c60c9f3abf3051513f736dd5a972e25e2.tar.gz go-6570ea3c60c9f3abf3051513f736dd5a972e25e2.zip |
container/heap: clarify that Remove returns the removed element
Change-Id: I63b59c1ca8265e9af7eb3f9210ee1d17925de891
Reviewed-on: https://go-review.googlesource.com/129779
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/container')
-rw-r--r-- | src/container/heap/heap.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/container/heap/heap.go b/src/container/heap/heap.go index 67b5efcac7..1ed0da8e6a 100644 --- a/src/container/heap/heap.go +++ b/src/container/heap/heap.go @@ -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 |