changeset 146:e03ccec4a08d v2

minor changes
author cin
date Mon, 09 Mar 2015 17:21:20 +0300
parents 706fccb85524
children 25cdef49102f
files Implab/PromiseT.cs
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
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) {