-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add lift to rxscala #1124
Add lift to rxscala #1124
Conversation
RxJava-pull-requests #1036 FAILURE |
// Add "No. " in front of each item | ||
val o = List(1, 2, 3).toObservable.lift { | ||
subscriber: Subscriber[String] => | ||
Subscriber( |
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.
even if it's not required, I'd write Subscriber[Int]
here, so that people immediately see that the function is of type Subscriber[String] => Subscriber[Int]
RxJava-pull-requests #1037 FAILURE |
Thank you for reviewing the codes, @samuelgruetter. I added the Operator conversion, and the Do you have any better idea about |
RxJava-pull-requests #1044 SUCCESS |
Is this ready? |
@@ -54,4 +54,12 @@ object JavaConversions { | |||
val asJavaObservable = observable | |||
} | |||
} | |||
|
|||
implicit def toJavaOperator[T, R](operator: Subscriber[R] => Subscriber[_ >: T]): rx.Observable.Operator[R, T] = { |
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.
Why do you use _ >: T
on a contravariant Scala type?
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.
Thank you. Already removed it.
RxJava-pull-requests #1053 SUCCESS |
LGTM. Thank you @zsxwing |
This PR added
lift
to RxScala and also added aSubscriber.apply
method to support to chainSubscriber
s./cc @samuelgruetter