diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-11-17 01:17:47 +0100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-11-16 19:17:47 -0500 |
commit | 8f9a942cb911ed017eb128e9fbeb6f9a48e69601 (patch) | |
tree | 4f56623262f84becac18546d9da3d5d9ce9c8735 /core/ops.rs | |
parent | cb00fd6e988184420f842b1e77ca4cf627d32773 (diff) |
Use futures 0.3 API (#3358)
Diffstat (limited to 'core/ops.rs')
-rw-r--r-- | core/ops.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/ops.rs b/core/ops.rs index cce454348..3a4f51b83 100644 --- a/core/ops.rs +++ b/core/ops.rs @@ -3,13 +3,15 @@ pub use crate::libdeno::OpId; use crate::PinnedBuf; use futures::Future; use std::collections::HashMap; +use std::pin::Pin; pub type Buf = Box<[u8]>; -pub type OpAsyncFuture<E> = Box<dyn Future<Item = Buf, Error = E> + Send>; +pub type OpAsyncFuture<E> = + Pin<Box<dyn Future<Output = Result<Buf, E>> + Send>>; pub(crate) type PendingOpFuture = - Box<dyn Future<Item = (OpId, Buf), Error = CoreError> + Send>; + Pin<Box<dyn Future<Output = Result<(OpId, Buf), CoreError>> + Send>>; pub type OpResult<E> = Result<Op<E>, E>; |