From 3afcb1a449ecfee52419767957fa1f06673515b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Sep 2014 12:26:12 -0400 Subject: Rather than crashing when there's a problem with the requested bloomfilter capacity/accuracy, fall back to a reasonable default bloom filter size. --- Utility/Bloom.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utility') diff --git a/Utility/Bloom.hs b/Utility/Bloom.hs index e3000de3d..b0988a8c4 100644 --- a/Utility/Bloom.hs +++ b/Utility/Bloom.hs @@ -9,7 +9,7 @@ module Utility.Bloom ( Bloom, - suggestSizing, + safeSuggestSizing, Hashable, cheapHashes, notElemB, @@ -25,7 +25,7 @@ import qualified Data.BloomFilter as Bloom #else import qualified Data.BloomFilter as Bloom #endif -import Data.BloomFilter.Easy (suggestSizing, Bloom) +import Data.BloomFilter.Easy (safeSuggestSizing, Bloom) import Data.BloomFilter.Hash (Hashable, cheapHashes) import Control.Monad.ST.Safe (ST) -- cgit v1.2.3