From 84f46c330142e8ac08d12d9d68aef316cd272f73 Mon Sep 17 00:00:00 2001 From: Nic Gibson Date: Mon, 30 Oct 2023 16:08:06 +0000 Subject: [PATCH] BUG: BFReserveArgs - error_rate & capacity (#2763) the error_rate and capacity parameters should not be optional - corrected --- probabilistic.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/probabilistic.go b/probabilistic.go index d397b490..5d5cd1a6 100644 --- a/probabilistic.go +++ b/probabilistic.go @@ -150,12 +150,7 @@ func (c cmdable) BFReserveNonScaling(ctx context.Context, key string, errorRate func (c cmdable) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd { args := []interface{}{"BF.RESERVE", key} if options != nil { - if options.Error != 0 { - args = append(args, options.Error) - } - if options.Capacity != 0 { - args = append(args, options.Capacity) - } + args = append(args, options.Error, options.Capacity) if options.Expansion != 0 { args = append(args, "EXPANSION", options.Expansion) }