Closed dyoshikawa closed 4 years ago
I'm a Rust newbie.
I want to try to use the egg-mode. I made the example repository.
But my code caused a compilation error.
rustc 1.41.0
[dependencies] egg-mode = { version = "0.13", features = ["hyper-rustls"], default-features = false } futures = "0.3"
fn main() { let con_token = egg_mode::KeyPair::new("consumer key", "consumer secret"); let request_token = futures::executor::block_on(egg_mode::request_token(&con_token, "oob")); // let auth_url = egg_mode::authorize_url(&request_token); // // let verifier = "123456"; // let (token, user_id, screen_name) = // egg_mode::access_token(con_token, &request_token, verifier).await.unwrap(); }
$ cargo build Compiling twitter-rs-playground v0.1.0 (/Users/dyoshikawa/src/github.com/dyoshikawa/twitter-rs-playground) error[E0277]: the trait bound `egg_mode::common::response::TwitterFuture<egg_mode::auth::KeyPair>: core::future::future::Future` is not satisfied
Do you have any ideas? Thank you for reading.
Hi, this is due to the crate not yet being compatible with futures 0.3. Coming very soon! Until then, use futures 0.1.
futures 0.3
futures 0.1
@adwhit Thank you. I knew things around async that change rapidly recently.
I'm a Rust newbie.
I want to try to use the egg-mode.
I made the example repository.
But my code caused a compilation error.
rustc -V
Dependencies
Code
Build and Error
Do you have any ideas?
Thank you for reading.