Skip to content

Commit 84f46c3

Browse files
authored
BUG: BFReserveArgs - error_rate & capacity (#2763)
the error_rate and capacity parameters should not be optional - corrected
1 parent 343016b commit 84f46c3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

probabilistic.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,7 @@ func (c cmdable) BFReserveNonScaling(ctx context.Context, key string, errorRate
150150
func (c cmdable) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd {
151151
args := []interface{}{"BF.RESERVE", key}
152152
if options != nil {
153-
if options.Error != 0 {
154-
args = append(args, options.Error)
155-
}
156-
if options.Capacity != 0 {
157-
args = append(args, options.Capacity)
158-
}
153+
args = append(args, options.Error, options.Capacity)
159154
if options.Expansion != 0 {
160155
args = append(args, "EXPANSION", options.Expansion)
161156
}

0 commit comments

Comments
 (0)