diff --git a/client.go b/client.go index d2c2b451..72da2321 100644 --- 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 c0132d77..41925860 100644 --- 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() +}