@@ -41,9 +41,7 namespace Implab { | |||
|
41 | 41 | public class Promise<T> : AbstractPromise<T>, IDeferred<T> { |
|
42 | 42 | |
|
43 | 43 | public static IPromise<T> FromResult(T value) { |
|
44 |
|
|
|
45 | p.Resolve(value); | |
|
46 | return p; | |
|
44 | return new SuccessPromise<T>(value); | |
|
47 | 45 | } |
|
48 | 46 | |
|
49 | 47 | public static IPromise<T> FromException(Exception error) { |
General Comments 0
You need to be logged in to leave comments.
Login now