Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0277]: the trait bound impl futures::future::Future: std::future::Future is not satisfied #230

Open
3goats opened this issue Jul 27, 2020 · 4 comments

Comments

@3goats
Copy link

3goats commented Jul 27, 2020

Hi, Im trying to work through the example but I'm getting the following error:

cargo build
   Compiling foo v0.1.0 (/Users/cbourne/development/rust/foo)
error[E0277]: the trait bound `impl futures::future::Future: std::future::Future` is not satisfied
 --> src/main.rs:7:11
  |
7 |     match docker.containers().list(&Default::default()).await {
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `impl futures::future::Future`
  |
  = note: required by `std::future::Future::poll`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `foo`.

To learn more, run the command again with --verbose.

Are there other dependancies in order for the example to work ?

@elihunter173
Copy link
Contributor

What version of shiplift are you using? async/await support is only on the current master branch, so the current release on crates.io (0.6.0) doesn't support async/await.

I can reproduce your error with these dependencies

[dependencies]
env_logger = "0.7"
futures = "0.3.1"
tokio = { version = "0.2.6", features = ["macros"] }
shiplift = "0.6"

But it works with these

[dependencies]
env_logger = "0.7"
futures = "0.3.1"
tokio = { version = "0.2.6", features = ["macros"] }
shiplift = { git = "https://github.com/softprops/shiplift.git", branch = "master" }

@shaaraddalvi
Copy link

shaaraddalvi commented Dec 11, 2020

Thanks, was stuck on this for sometime! When is the support for async-await planned in released versions?

@elihunter173
Copy link
Contributor

Hopefully soon. @softprops controls releases to crates.io

@danieleades
Copy link
Contributor

can this be closed?

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

No branches or pull requests

4 participants