-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style tweaks in stream_queue.dart (dart-archive/async#167)
- Use a noun phrase to document the `hasNext` getter. The `next` and `peek` getters keep their verb phrase doc comments since the side effects are critical distinctions between these methods. If we were writing this today, `next()` would be a method. - Change `_failClosed()` which returns an error, to `_checkNotClosed()` which checks the condition and optionally closes. Avoid nesting the majority of method behavior in a conditional. - Use `RangeError.checkNotNegative` over a conditional. - Change bare `Future` to `Future<void>` in code examples. - Make `withTransaction` `async` since there is no longer a blocker now that async methods start running synchronously.
- Loading branch information
Showing
1 changed file
with
52 additions
and
68 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