Skip to content

Commit f1ada25

Browse files
author
ellie
committed
fix lint
1 parent 425cd6d commit f1ada25

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

options.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ func WithMaxSize[Key comparable, Value any](sz int32) func(cacheOptions[Key, Val
5555
// WithRemovalListeners is a CacheOption which allows you to listen for keys that have been removed, and react accordingly.
5656
func WithRemovalListeners[Key comparable, Value any](li ...RemovalListener[Key, Value]) func(cacheOptions[Key, Value]) cacheOptions[Key, Value] {
5757
return func(opt cacheOptions[Key, Value]) cacheOptions[Key, Value] {
58-
for _, l := range li {
59-
opt.removalListeners = append(opt.removalListeners, l)
60-
}
58+
opt.removalListeners = append(opt.removalListeners, li...)
6159
return opt
6260
}
6361
}

0 commit comments

Comments
 (0)