From fc325274e84a0c16b758e3d6b121c9af1150cce2 Mon Sep 17 00:00:00 2001 From: Anton Tiurin Date: Wed, 25 Mar 2015 00:11:04 +0300 Subject: [PATCH] History.Swap Use parallel assignment to swap elements, as it's a more idiomatic way for golang than using a temp variable. Signed-off-by: Anton Tiurin --- daemon/history.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/daemon/history.go b/daemon/history.go index 0b125ad2b..f71750872 100644 --- a/daemon/history.go +++ b/daemon/history.go @@ -19,9 +19,7 @@ func (history *History) Less(i, j int) bool { func (history *History) Swap(i, j int) { containers := *history - tmp := containers[i] - containers[i] = containers[j] - containers[j] = tmp + containers[i], containers[j] = containers[j], containers[i] } func (history *History) Add(container *Container) {