-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend MonoFlux
Refaster rule
#358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and added a commit.
Nice addition @werli 🚀!
Tried to think of other possible variants but couldn't think of them.
Alternative suggested commit message (or we should just use the already proposed one 🤔):
Have `MonoFlux` flag `Mono#FlatMapMany(Flux::just)` cases
@@ -559,7 +559,7 @@ Flux<S> after(Flux<T> flux) { | |||
static final class MonoFlux<T> { | |||
@BeforeTemplate | |||
Flux<T> before(Mono<T> mono) { | |||
return Flux.concat(mono); | |||
return Refaster.anyOf(Flux.concat(mono), mono.flatMapMany(Flux::just)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually list Mono
s before Flux
es, so will change the order :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted for the future. 📝
d03eae3
to
600963f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a commit.
Suggested commit message, in light of further additions:
Extend `MonoFlux` Refaster rule (#358)
@@ -559,7 +559,7 @@ Flux<S> after(Flux<T> flux) { | |||
static final class MonoFlux<T> { | |||
@BeforeTemplate | |||
Flux<T> before(Mono<T> mono) { | |||
return Flux.concat(mono); | |||
return Refaster.anyOf(mono.flatMapMany(Flux::just), Flux.concat(mono)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also Mono::just
🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one. 👍 Thanks!
As I had noticed during code review. 👍
Suggested commit message