mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-12 16:52:29 +08:00
fix: fix TestEachWithBreak case
This commit is contained in:
@@ -175,7 +175,7 @@ func (s Set[T]) Minus(comparedSet Set[T]) Set[T] {
|
||||
// EachWithBreak iterates over elements of a set and invokes function for each element,
|
||||
// when iteratee return false, will break the for each loop.
|
||||
func (s Set[T]) EachWithBreak(iteratee func(item T) bool) {
|
||||
for v := range s {
|
||||
for _, v := range s.Values() {
|
||||
if !iteratee(v) {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user