summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Exchange/Block.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Exchange/Block.hs b/src/Network/BitTorrent/Exchange/Block.hs
index 0f437381..6e5b960a 100644
--- a/src/Network/BitTorrent/Exchange/Block.hs
+++ b/src/Network/BitTorrent/Exchange/Block.hs
@@ -317,8 +317,9 @@ spans expectedSize = go 0
317 317
318-- | /O(1)/. A new empty bucket capable to alloof specified size. 318-- | /O(1)/. A new empty bucket capable to alloof specified size.
319empty :: PieceSize -> Bucket 319empty :: PieceSize -> Bucket
320empty 0 = error "empty: Bucket size is zero" 320empty sz
321empty sz = Span sz Nil 321 | sz < 0 = error "empty: Bucket size must be a non-negative value"
322 | otherwise = Span sz Nil
322{-# INLINE empty #-} 323{-# INLINE empty #-}
323 324
324insertSpan :: Pos -> BS.ByteString -> ChunkSize -> Bucket -> Bucket 325insertSpan :: Pos -> BS.ByteString -> ChunkSize -> Bucket -> Bucket