]> Sergey Matveev's repositories - btrtrc.git/blobdiff - client_test.go
Apply staticcheck
[btrtrc.git] / client_test.go
index 372f4bcdc09091a9fcb4a82f1f9b324dd9677e30..0278d42c41268051a6d7235ff691fcbec067f208 100644 (file)
@@ -5,7 +5,6 @@ import (
        "fmt"
        "io"
        "io/ioutil"
-       "log"
        "os"
        "path/filepath"
        "reflect"
@@ -317,16 +316,6 @@ type testClientTransferParams struct {
        LeecherDownloadRateLimiter *rate.Limiter
 }
 
-func logPieceStateChanges(t *Torrent) {
-       sub := t.SubscribePieceStateChanges()
-       go func() {
-               defer sub.Close()
-               for e := range sub.Values {
-                       log.Printf("%p %#v", t, e)
-               }
-       }()
-}
-
 // Creates a seeder and a leecher, and ensures the data transfers when a read
 // is attempted on the leecher.
 func testClientTransfer(t *testing.T, ps testClientTransferParams) {
@@ -1142,7 +1131,7 @@ func TestIssue335(t *testing.T) {
        assert.True(t, new)
        require.True(t, cl.WaitAll())
        tor.Drop()
-       tor, new, err = cl.AddTorrentSpec(TorrentSpecFromMetaInfo(mi))
+       _, new, err = cl.AddTorrentSpec(TorrentSpecFromMetaInfo(mi))
        require.NoError(t, err)
        assert.True(t, new)
        require.True(t, cl.WaitAll())