]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Don't ignore error getting mmap piece completion
authorMatt Joiner <anacrolix@gmail.com>
Fri, 11 Oct 2019 06:36:46 +0000 (17:36 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 11 Oct 2019 06:36:46 +0000 (17:36 +1100)
storage/mmap.go

index 8bce4dc778827acea4096c57ff5dc37e479d1750..53d8680c5a098a77fb29ec7733a2fa6504d69658 100644 (file)
@@ -78,7 +78,10 @@ func (me mmapStoragePiece) pieceKey() metainfo.PieceKey {
 }
 
 func (sp mmapStoragePiece) Completion() Completion {
-       c, _ := sp.pc.Get(sp.pieceKey())
+       c, err := sp.pc.Get(sp.pieceKey())
+       if err != nil {
+               panic(err)
+       }
        return c
 }