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

Unified Diff: pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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: pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
diff --git a/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
index 5003c726cb13653430ac0cdea56ed78d29aabf8a..97f8c92341c5f78a573887bccc5c911d625692b3 100644
--- a/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
@@ -46,7 +46,7 @@ class DirectoryDescriptor extends Descriptor {
}
return Future.wait(contents.map((entry) {
- return new Future.of(() => entry.validateNow(fullPath))
+ return new Future.sync(() => entry.validateNow(fullPath))
.then((_) => null)
.catchError((e) => e);
})).then((results) {
@@ -57,7 +57,7 @@ class DirectoryDescriptor extends Descriptor {
}
Stream<List<int>> load(String pathToLoad) {
- return futureStream(new Future.immediate(null).then((_) {
+ return futureStream(new Future.value().then((_) {
if (_path.isAbsolute(pathToLoad)) {
throw "Can't load absolute path '$pathToLoad'.";
}
« no previous file with comments | « pkg/scheduled_test/lib/scheduled_server.dart ('k') | pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698