Mercurial > pub > ImplabNet
diff Implab/PromiseT.cs @ 146:e03ccec4a08d v2
minor changes
author | cin |
---|---|
date | Mon, 09 Mar 2015 17:21:20 +0300 |
parents | 8c0b95069066 |
children | 4d9830a9bbb8 |
line wrap: on
line diff
--- a/Implab/PromiseT.cs Sun Mar 08 02:52:27 2015 +0300 +++ b/Implab/PromiseT.cs Mon Mar 09 17:21:20 2015 +0300 @@ -41,9 +41,7 @@ public class Promise<T> : AbstractPromise<T>, IDeferred<T> { public static IPromise<T> FromResult(T value) { - var p = new Promise<T>(); - p.Resolve(value); - return p; + return new SuccessPromise<T>(value); } public static IPromise<T> FromException(Exception error) {