Skip to content
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

Disposables.from annoying to use with lambda #4446

Closed
robeden opened this issue Aug 30, 2016 · 4 comments
Closed

Disposables.from annoying to use with lambda #4446

robeden opened this issue Aug 30, 2016 · 4 comments

Comments

@robeden
Copy link

robeden commented Aug 30, 2016

(Sorry if this isn't the best place for this feedback.)

Disposables.from() in 2.0 (RC-1) is annoying to use with a lambda because both Runnable and Action match. Example:

Disposables.from( () -> {} );             // This won't compile
Disposables.from( (Runnable) () -> {} );  // This compiles

Perhaps one form should have different name?

@JakeWharton
Copy link
Contributor

This is the place! We do that everywhere else (e.g., Observable.fromXxx), so it seems reasonable.

@akarnokd
Copy link
Member

I'll deprecate them and add the postfixed versions in my upcoming PR (among other fixes).

@akarnokd
Copy link
Member

Closing via #4450

@robeden
Copy link
Author

robeden commented Aug 31, 2016

Awesome, thanks guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants