]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Return errors in mmap storage piece completion
authorMatt Joiner <anacrolix@gmail.com>
Fri, 25 Apr 2025 01:46:07 +0000 (11:46 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 25 Apr 2025 01:46:07 +0000 (11:46 +1000)
storage/mmap.go

index 8af981996ff6cf218635110aa69f739f4991d657..15ff99018b255d7733757196a511d0e26cea0a34 100644 (file)
@@ -106,13 +106,11 @@ func (sp mmapStoragePiece) Completion() Completion {
 }
 
 func (sp mmapStoragePiece) MarkComplete() error {
-       sp.pc.Set(sp.pieceKey(), true)
-       return nil
+       return sp.pc.Set(sp.pieceKey(), true)
 }
 
 func (sp mmapStoragePiece) MarkNotComplete() error {
-       sp.pc.Set(sp.pieceKey(), false)
-       return nil
+       return sp.pc.Set(sp.pieceKey(), false)
 }
 
 func mMapTorrent(md *metainfo.Info, location string) (mms *mmap_span.MMapSpan, err error) {