]> Cypherpunks repositories - gostls13.git/commit
container/heap: remove one unnecessary comparison in Fix
authorSina Siadat <siadat@gmail.com>
Mon, 20 Jun 2016 20:24:52 +0000 (00:54 +0430)
committerRobert Griesemer <gri@golang.org>
Tue, 16 Aug 2016 00:40:03 +0000 (00:40 +0000)
commitb98d8cd5ce0c279674472af247d86f8c0b73828a
tree6217d40271ac9967567318cd647677291257ea8d
parentb5e43e669a5e1591c9a6c7157b4dd0d2796d3037
container/heap: remove one unnecessary comparison in Fix

The heap.Fix function calls both down and up.  If the element is moved
down, we don't need to call up and we could save a comparison.

(per suggestion by Radu Berinde)

Fixes #16098.

Change-Id: I83a74710e66cf0d274d8c0743338c26f89f31afe
Reviewed-on: https://go-review.googlesource.com/24273
Reviewed-by: Robert Griesemer <gri@golang.org>
src/container/heap/heap.go