Skip to content

Commit

Permalink
Use iterator chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
BooleanCat authored and danail-branekov committed Jul 15, 2024
1 parent 740bb99 commit c93d4b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/repositories/service_broker_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (r *ServiceBrokerRepo) ListServiceBrokers(ctx context.Context, authInfo aut
return nil, fmt.Errorf("failed to list brokers: %w", apierrors.FromK8sError(err, ServiceBrokerResourceType))
}

brokers := iter.Filter(iter.Lift(brokersList.Items), message.matches)
brokers := iter.Lift(brokersList.Items).Filter(message.matches)

return iter.Collect(iter.Map(brokers, toServiceBrokerResource)), nil
return iter.Map(brokers, toServiceBrokerResource).Collect(), nil
}

0 comments on commit c93d4b6

Please sign in to comment.