From: Matt Joiner Date: Fri, 29 Jul 2016 14:48:15 +0000 (+1000) Subject: Fix build error with missinggo.Sorted X-Git-Tag: v1.0.0~619 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=00f406753aaf34e34fe22214c5b248dd01ccdb83;p=btrtrc.git Fix build error with missinggo.Sorted --- diff --git a/client.go b/client.go index 0e0d18eb..5d2c4e02 100644 --- a/client.go +++ b/client.go @@ -149,7 +149,7 @@ func (cl *Client) WriteStatus(_w io.Writer) { } fmt.Fprintf(w, "# Torrents: %d\n", len(cl.Torrents())) fmt.Fprintln(w) - for _, t := range slices.Sorted(cl.Torrents(), func(l, r *Torrent) bool { + for _, t := range slices.Sort(append([]*Torrent(nil), cl.Torrents()...), func(l, r *Torrent) bool { return l.InfoHash().AsString() < r.InfoHash().AsString() }).([]*Torrent) { if t.Name() == "" {