Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Feb 20, 2024
1 parent a58bab8 commit 32b47d8
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1207,17 +1207,18 @@ Flux<T> after(Flux<? extends Iterable<T>> flux, int prefetch) {
}

/**
* Don't unnecessarily convert {@link Collection} to {@link Stream} before creating {@link Flux}.
* Don't unnecessarily convert a {@link Collection} to a {@link Stream} before creating a {@link
* Flux}.
*/
static final class FluxFromIterable<T> {
@BeforeTemplate
Flux<T> before(Collection<T> c) {
return Flux.fromStream(c.stream());
Flux<T> before(Collection<T> collection) {
return Flux.fromStream(collection.stream());
}

@AfterTemplate
Flux<T> after(Collection<T> c) {
return Flux.fromIterable(c);
Flux<T> after(Collection<T> collection) {
return Flux.fromIterable(collection);
}
}

Expand Down

0 comments on commit 32b47d8

Please sign in to comment.