-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace onComplete with onSuccess + onFailure
Simplify the code by replacing onComplete + if-ar.succeeded-else with onSuccess and onFailure. This avoid the additional nesting of the if-else clause. In addition to the verbose exampleFuture1 code show how it can be reduced to concise but still understandable code.
- Loading branch information
1 parent
3eb4248
commit 0fb18e0
Showing
2 changed files
with
98 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters