From b579a49a247a42b2d833d2120d8f24395bac0967 Mon Sep 17 00:00:00 2001 From: Keerti Parthasarathy Date: Fri, 3 Aug 2018 16:26:02 -0700 Subject: [PATCH] Add missing return to fix analysis (dart-lang/watcher#62) * Add missing return to fix analysis * address comment * Update async_queue.dart --- pkgs/watcher/CHANGELOG.md | 4 ++++ pkgs/watcher/lib/src/async_queue.dart | 5 +++-- pkgs/watcher/pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/watcher/CHANGELOG.md b/pkgs/watcher/CHANGELOG.md index 7ea1cc1f3..cd34d904e 100644 --- a/pkgs/watcher/CHANGELOG.md +++ b/pkgs/watcher/CHANGELOG.md @@ -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. diff --git a/pkgs/watcher/lib/src/async_queue.dart b/pkgs/watcher/lib/src/async_queue.dart index 1895c804e..1904192b4 100644 --- a/pkgs/watcher/lib/src/async_queue.dart +++ b/pkgs/watcher/lib/src/async_queue.dart @@ -59,12 +59,13 @@ class AsyncQueue { /// 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; }); } } diff --git a/pkgs/watcher/pubspec.yaml b/pkgs/watcher/pubspec.yaml index 73ce19b36..8f38a49f6 100644 --- a/pkgs/watcher/pubspec.yaml +++ b/pkgs/watcher/pubspec.yaml @@ -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