diff options
Diffstat (limited to 'src/System/Torrent/Storage.hs')
-rw-r--r-- | src/System/Torrent/Storage.hs | 4 |
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 | |||
172 | getPiece pix st @ Storage {..} = {-# SCC getPiece #-} do | 172 | getPiece 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 | ||
178 | resetPiece :: PieceIx -> Storage -> IO () | 178 | resetPiece :: PieceIx -> Storage -> IO () |
179 | resetPiece pix st @ Storage {..} | 179 | resetPiece pix st @ Storage {..} |