Skip to content

Commit

Permalink
Suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Feb 21, 2024
1 parent 300b3cf commit da6eee2
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Collector;
import java.util.stream.Stream;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
Expand Down Expand Up @@ -1206,10 +1205,7 @@ Flux<T> after(Flux<? extends Iterable<T>> flux, int prefetch) {
}
}

/**
* Don't unnecessarily convert a {@link Collection} to a {@link Stream} before creating a {@link
* Flux}.
*/
/** Prefer {@link Flux#fromIterable(Iterable)} over less efficient alternatives. */
static final class FluxFromIterable<T> {
@BeforeTemplate
Flux<T> before(Collection<T> collection) {
Expand Down

0 comments on commit da6eee2

Please sign in to comment.