The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5406
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Change value swap through tmp variable to a parallel assignment.
From d123225e7db5c86c3088a98588de55ba97558daa Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" <quasil...@gmail.com> Date: Fri, 11 Jan 2019 19:15:03 +0300 Subject: [PATCH] lxd/types: use parallel assignment for val swap Change value swap through tmp variable to a parallel assignment. --- lxd/types/devices_sort.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lxd/types/devices_sort.go b/lxd/types/devices_sort.go index 359431ee42..938b240d09 100644 --- a/lxd/types/devices_sort.go +++ b/lxd/types/devices_sort.go @@ -32,9 +32,7 @@ func (devices sortableDevices) Less(i, j int) bool { } func (devices sortableDevices) Swap(i, j int) { - tmp := devices[i] - devices[i] = devices[j] - devices[j] = tmp + devices[i], devices[j] = devices[j], devices[i] } func (devices sortableDevices) Names() []string {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel