| Index: lib/src/result/future.dart
|
| diff --git a/lib/src/result/future.dart b/lib/src/result/future.dart
|
| index 749b101f0678210e1c5316d1cf0b405549741858..6a4cc99d1717af4de38693a1f6b6a5c663efcbbf 100644
|
| --- a/lib/src/result/future.dart
|
| +++ b/lib/src/result/future.dart
|
| @@ -19,15 +19,9 @@ class ResultFuture<T> extends DelegatingFuture<T> {
|
| Result<T> get result => _result;
|
| Result<T> _result;
|
|
|
| - factory ResultFuture(Future<T> future) {
|
| - ResultFuture<T> resultFuture;
|
| - resultFuture = new ResultFuture._(() async {
|
| - var result = await Result.capture(future);
|
| - resultFuture._result = result;
|
| - return await result.asFuture;
|
| - }());
|
| - return resultFuture;
|
| + ResultFuture(Future<T> future) : super(future) {
|
| + Result.capture(future).then((result) {
|
| + _result = result;
|
| + });
|
| }
|
| -
|
| - ResultFuture._(Future<T> future) : super(future);
|
| }
|
|
|