]> Sergey Matveev's repositories - btrtrc.git/blobdiff - metainfo/piece.go
Remove the InfoEx type, and don't generate its infohash on the fly
[btrtrc.git] / metainfo / piece.go
index a68f1bce7f538c196b24dbde6bedd64005dcd1a7..ff753bd3c88d0f83d475fa91e5c354be1f06ae10 100644 (file)
@@ -3,7 +3,7 @@ package metainfo
 import "github.com/anacrolix/missinggo"
 
 type Piece struct {
-       Info *InfoEx
+       Info *Info
        i    int
 }
 
@@ -26,12 +26,3 @@ func (p Piece) Hash() (ret Hash) {
 func (p Piece) Index() int {
        return p.i
 }
-
-func (p Piece) Key() PieceKey {
-       return PieceKey{p.Info.Hash(), p.i}
-}
-
-type PieceKey struct {
-       Hash  Hash
-       Index int
-}