From 6570ea3c60c9f3abf3051513f736dd5a972e25e2 Mon Sep 17 00:00:00 2001 From: Qais Patankar Date: Sun, 19 Aug 2018 15:42:27 +0100 Subject: [PATCH] container/heap: clarify that Remove returns the removed element Change-Id: I63b59c1ca8265e9af7eb3f9210ee1d17925de891 Reviewed-on: https://go-review.googlesource.com/129779 Reviewed-by: Brad Fitzpatrick --- src/container/heap/heap.go | 4 ++-- 1 file 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 -- 2.50.0