Skip to content

Comments

WIP: refactor(*): use futures 0.3 & tokio 0.2#41

Open
Cogitri wants to merge 1 commit intoxi-frontend:masterfrom
Cogitri:futures-03
Open

WIP: refactor(*): use futures 0.3 & tokio 0.2#41
Cogitri wants to merge 1 commit intoxi-frontend:masterfrom
Cogitri:futures-03

Conversation

@Cogitri
Copy link
Collaborator

@Cogitri Cogitri commented Jan 18, 2020

Currently fails with

error[E0277]: the trait bound `(dyn core::future::future::Future<Output = std::result::Result<serde_json::Value, serde_json::Value>> + std::marker::Send + 'static): std::marker::Unpin` is not satisfied
  --> src/frontend.rs:68:5
   |
65 | impl<F: Frontend + Send + Sized> Service for F {
   | ---------------------------------------------- in this `impl` item
...
68 |     type RequestFuture = Box<dyn Future<Output = Result<Self::T, Self::E>> + 'static + Send>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `(dyn core::future::future::Future<Output = std::result::Result<serde_json::Value, serde_json::Value>> + std::marker::Send + 'static)`
   | 
  ::: src/protocol/server.rs:18:10
   |
18 |     type RequestFuture: IntoStaticFuture;
   |          ------------- associated type defined here
   |
   = note: required because of the requirements on the impl of `core::future::future::Future` for `std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<serde_json::Value, serde_json::Value>> + std::marker::Send + 'static)>`
   = note: required because of the requirements on the impl of `protocol::server::IntoStaticFuture` for `std::boxed::Box<(dyn core::future::future::Future<Output = std::result::Result<serde_json::Value, serde_json::Value>> + std::marker::Send + 'static)>`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant