]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix build error with missinggo.Sorted
authorMatt Joiner <anacrolix@gmail.com>
Fri, 29 Jul 2016 14:48:15 +0000 (00:48 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 29 Jul 2016 14:48:15 +0000 (00:48 +1000)
client.go

index 0e0d18eb1b95fa2c3856af8f4064a1924389d0e7..5d2c4e02abd4d1f98cc4ead3ddbe66b54240b948 100644 (file)
--- 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() == "" {