-
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.
Explain onComplete vs. onSuccess + onFailure
Simplify the code by replacing onComplete + if-ar.succeeded-else with either onComplete(res, e) or with other processing. Avoiding onComplete + if-ar.succeeded-else results in more concise and understandable code because it avoids the additional nesting of the if-else clause. Extend the `exampleFuture*` code to discuss all possibilities how onComplete and onSuccess/onFailure might be used. Remove unused exampleFuture2 from lines 173-186. A new exampleFuture2 is created in line 145.
- Loading branch information
1 parent
56a122a
commit e9fe56f
Showing
2 changed files
with
121 additions
and
100 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