Closed jburnett closed 4 years ago
You should use futures-state-stream="0.1". Futures 0.3 might work with a compatibility layer, but try first with 0.1.
Thanks! That fixed it. In case you're interested, a warning still occurs:
warning: use of deprecated item 'tokio::executor::current_thread': use tokio-current-thread crate or functions in tokio::runtime::current_thread instead --> src/main.rs:7:5
|
7 | use tokio::executor::current_thread;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note:
#[warn(deprecated)]on by default
Follow repro steps for issue #111; using the following in Cargo.toml
[dependencies]
tiberius = { version = "0.3.*", default-features=false,features=["chrono"] }
futures = "0.3.*"
futures-state-stream = "0.2.*"
tokio = "0.1.*"
Build using
cargo build
Result:
error: the
and_thenmethod cannot be invoked on a trait object
--> src/main.rs:24:9
|
24 | .and_then(|conn| {
| ^^^^^^^^
|
The associated suggestion did not fix the error.
help: another candidate was found in the following trait, perhaps add a
usefor it:
|
5 | use crate::tokio::prelude::Future;
|