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

Unified Diff: sdk/lib/io/link.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
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/link.dart
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
index 347ae1f5147ba5a0ce02822200b6b405db11e2ab..d36d7796424212cbd1d37deba4c28784eeeda3da 100644
--- a/sdk/lib/io/link.dart
+++ b/sdk/lib/io/link.dart
@@ -130,7 +130,7 @@ class _Link extends FileSystemEntity implements Link {
Future<bool> exists() {
// TODO(whesse): Replace with asynchronous version.
- return new Future.immediate(existsSync());
+ return new Future.value(existsSync());
}
bool existsSync() => FileSystemEntity.isLinkSync(path);
@@ -205,7 +205,7 @@ class _Link extends FileSystemEntity implements Link {
Future<String> target() {
// TODO(whesse): Replace with asynchronous version.
- return new Future.of(targetSync);
+ return new Future.sync(targetSync);
}
String targetSync() {
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698