I'm experimenting with Rust using the shiplift
library and trying to run the basic example provided in the repo.
use shiplift::Docker;
#[tokio::main]
async fn main() {
let docker = Docker::new();
match docker.info().await {
Ok(info) => println!("info {:?}", info),
Err(e) => eprintln!("Error: {}", e),
}
}
When I try to compile, I get an error:
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.info().await {
| ^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `impl futures::future::Future`
|
= note: required by `std::future::Future::poll`
My Cargo.toml
file looks like this:
[package]
name = "foo"
version = "0.1.0"
authors = ["carlskii"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
shiplift = "0.6"
tokio = { version = "0.2.22", features = ["macros", "tcp", "dns", "io-util"] }
log = "0.4.0"
env_logger = "0.7.1"
futures = "0.3.1"