Move methods to correct file

This commit is contained in:
Matt Joiner 2015-06-23 02:02:22 +10:00
parent c76f3c1ead
commit 4b6c8b1c39
2 changed files with 10 additions and 10 deletions

View File

@ -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

10
t.go
View File

@ -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()
}