]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Move methods to correct file
authorMatt Joiner <anacrolix@gmail.com>
Mon, 22 Jun 2015 16:02:22 +0000 (02:02 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 22 Jun 2015 16:02:22 +0000 (02:02 +1000)
client.go
t.go

index d2c2b4510c1e6617d0a55e99fbea274c79af028c..72da23214ad35255080db90edc6eb28b100a8d61 100644 (file)
--- a/client.go
+++ b/client.go
@@ -1971,16 +1971,6 @@ func (t *torrent) BytesCompleted() int64 {
        return t.Info.TotalLength() - t.bytesLeft()
 }
 
-func (t Torrent) NumPieces() int {
-       return t.numPieces()
-}
-
-func (t Torrent) Drop() {
-       t.cl.mu.Lock()
-       t.cl.dropTorrent(t.InfoHash)
-       t.cl.mu.Unlock()
-}
-
 // A file-like handle to some torrent data resource.
 type Handle interface {
        io.Reader
diff --git a/t.go b/t.go
index c0132d773cdbadefaebbfd5f9b2d752f50f21abe..419258600a6ca1aedd800dd809c147950a877e6a 100644 (file)
--- a/t.go
+++ b/t.go
@@ -42,3 +42,13 @@ func (t *Torrent) PieceStateRuns() []PieceStateRun {
        defer t.stateMu.Unlock()
        return t.torrent.pieceStateRuns()
 }
+
+func (t Torrent) NumPieces() int {
+       return t.numPieces()
+}
+
+func (t Torrent) Drop() {
+       t.cl.mu.Lock()
+       t.cl.dropTorrent(t.InfoHash)
+       t.cl.mu.Unlock()
+}