Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: utils/pub/validator/name.dart

Issue 12042053: Get rid of unneeded Future.immediate() calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: utils/pub/validator/name.dart
diff --git a/utils/pub/validator/name.dart b/utils/pub/validator/name.dart
index 67e2da0257bc6bca4a76f96843f46fe741622506..eb1bc85034edc1b1295ab73049d598ed79c82120 100644
--- a/utils/pub/validator/name.dart
+++ b/utils/pub/validator/name.dart
@@ -48,7 +48,7 @@ class NameValidator extends Validator {
Future<List<String>> get _libraries {
var libDir = join(entrypoint.root.dir, "lib");
return dirExists(libDir).then((libDirExists) {
- if (!libDirExists) return new Future.immediate([]);
+ if (!libDirExists) return [];
return listDir(libDir, recursive: true);
}).then((files) {
return files

Powered by Google App Engine
This is Rietveld 408576698