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

Unified Diff: pkg/scheduled_test/lib/src/descriptor/nothing_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/nothing_descriptor.dart
diff --git a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
index e56db2a204454e4896002f2a135406b5aa0584a8..1cc47f55862a9b4a60a79b5c61981b8050519948 100644
--- a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
@@ -19,12 +19,12 @@ class NothingDescriptor extends Descriptor {
NothingDescriptor(String name)
: super(name);
- Future create([String parent]) => new Future.immediate(null);
+ Future create([String parent]) => new Future.value();
Future validate([String parent]) => schedule(() => validateNow(parent),
"validating '$name' doesn't exist");
- Future validateNow([String parent]) => new Future.of(() {
+ Future validateNow([String parent]) => new Future.sync(() {
if (parent == null) parent = defaultRoot;
var fullPath = path.join(parent, name);
if (new File(fullPath).existsSync()) {

Powered by Google App Engine
This is Rietveld 408576698