mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #11726 from noxiouz/history-swap-parallel-assignment
History.Swap Use parallel assignment to swap elements
This commit is contained in:
commit
979283a166
1 changed files with 1 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue