diff --git a/oden-js/src/promise.rs b/oden-js/src/promise.rs index 0bf846cc..8ee23b26 100644 --- a/oden-js/src/promise.rs +++ b/oden-js/src/promise.rs @@ -12,7 +12,7 @@ impl PromiseHandle { } } -pub type PromiseResult = Box ValueResult + Send + 'static>; +pub type PromiseResult = Box ValueResult + Send + 'static>; pub(crate) enum PromiseEvent { Resolved(PromiseResult), @@ -48,7 +48,7 @@ impl Promise { pub fn resolve(mut self, value: T) where - T: Fn(&ContextRef) -> ValueResult + Send + 'static, + T: FnOnce(&ContextRef) -> ValueResult + Send + 'static, { let _ = self .channel @@ -58,7 +58,7 @@ impl Promise { pub fn reject(mut self, value: T) where - T: Fn(&ContextRef) -> ValueResult + Send + 'static, + T: FnOnce(&ContextRef) -> ValueResult + Send + 'static, { let _ = self .channel