Skip to content

Commit

Permalink
Add missing return to fix analysis (dart-lang/watcher#62)
Browse files Browse the repository at this point in the history
* Add missing return to fix analysis

* address comment

* Update async_queue.dart
  • Loading branch information
keertip authored Aug 3, 2018
1 parent 72e6065 commit b579a49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pkgs/watcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.9.7+11

* Fix an analysis hint.

# 0.9.7+10

* Set max SDK version to `<3.0.0`, and adjust other dependencies.
Expand Down
5 changes: 3 additions & 2 deletions pkgs/watcher/lib/src/async_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ class AsyncQueue<T> {
/// the process was cancelled.
Future _processNextItem() {
var item = _items.removeFirst();
return _processor(item).then((_) {
if (_items.isNotEmpty) return _processNextItem();
return _processor(item).then((_) async {
if (_items.isNotEmpty) return await _processNextItem();

// We have drained the queue, stop processing and wait until something
// has been enqueued.
_isProcessing = false;
return null;
});
}
}
2 changes: 1 addition & 1 deletion pkgs/watcher/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: watcher
version: 0.9.7+10
version: 0.9.7+11

description: >
A file system watcher. It monitors changes to contents of directories and
Expand Down

0 comments on commit b579a49

Please sign in to comment.