-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(capi): make early returns consistent in C examples (#2812)
- Since the `if` condition already causes the loop to `break`, the `else` is not necessary. We wouldn't have reached the `else` block, anyway, if the prior `if` condition passed. - We are more likely to poll a successful chunk than finish the request or throw an error. Thus, it is best if we go for the optimistic route and check for the successful case first.
- Loading branch information
Showing
2 changed files
with
102 additions
and
103 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