summaryrefslogtreecommitdiff
path: root/src/System/Torrent/Storage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/System/Torrent/Storage.hs')
-rw-r--r--src/System/Torrent/Storage.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System/Torrent/Storage.hs b/src/System/Torrent/Storage.hs
index 8a884196..955c1746 100644
--- a/src/System/Torrent/Storage.hs
+++ b/src/System/Torrent/Storage.hs
@@ -172,8 +172,8 @@ getPiece :: PieceIx -> Storage -> IO ByteString
172getPiece pix st @ Storage {..} = {-# SCC getPiece #-} do 172getPiece pix st @ Storage {..} = {-# SCC getPiece #-} do
173 let pieceLen = pieceLength session 173 let pieceLen = pieceLength session
174 let bix = BlockIx pix 0 (pieceLength session) 174 let bix = BlockIx pix 0 (pieceLength session)
175 bs <- readBytes (ixInterval pieceLen bix) payload 175 let bs = viewBytes (ixInterval pieceLen bix) payload
176 return (Lazy.toStrict bs) 176 return $! Lazy.toStrict bs
177 177
178resetPiece :: PieceIx -> Storage -> IO () 178resetPiece :: PieceIx -> Storage -> IO ()
179resetPiece pix st @ Storage {..} 179resetPiece pix st @ Storage {..}