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

Unified Diff: lib/src/result/future.dart

Issue 1841223002: Fix most strong mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Code review changes Created 4 years, 9 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 | « lib/src/result/error.dart ('k') | lib/src/result/value.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/result/future.dart
diff --git a/lib/src/result/future.dart b/lib/src/result/future.dart
index db9dd822c112883fe93d7ab08279c1b0c7939a8d..209e8b1e6b226fe5a9d51d579f143f088082c25f 100644
--- a/lib/src/result/future.dart
+++ b/lib/src/result/future.dart
@@ -20,11 +20,12 @@ class ResultFuture<T> extends DelegatingFuture<T> {
Result<T> _result;
factory ResultFuture(Future<T> future) {
- var resultFuture;
- resultFuture = new ResultFuture._(Result.capture(future).then((result) {
+ ResultFuture<T> resultFuture;
+ resultFuture = new ResultFuture._(() async {
+ var result = await Result.capture(future);
resultFuture._result = result;
- return result.asFuture;
- }));
+ return await result.asFuture;
+ }());
return resultFuture;
}
« no previous file with comments | « lib/src/result/error.dart ('k') | lib/src/result/value.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698