From eeb5289f24447600150fc4af1d25634cb6c7dee9 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 26 Jan 2016 15:48:19 +0100 Subject: Minor optimization --- messages.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/messages.go b/messages.go index f1bda5f..c6f11ae 100644 --- a/messages.go +++ b/messages.go @@ -58,10 +58,9 @@ func (a Authorization) Supported(sol map[ChalType]Solver) []Challenge { } for _, com := range a.Combinations { if supported(com) { - var c []Challenge - for _, n := range com { - ch := a.Challenges[n] - c = append(c, ch) + c := make([]Challenge, len(com)) + for i, n := range com { + c[i] = a.Challenges[n] } return c } -- cgit v1.2.3