binance-spot-connector-rust
binance-spot-connector-rust copied to clipboard
Fix build of feature "enable-tokio-tungstenite"
This PR fix the build error when it compiles only with feature enable-tokio-tungstenite
. Feature enable-tokio-tungstenite
requires tokio and futures_util.
Test command
cargo build --features enable-tokio-tungstenite
It fails to build without this commit:
error[E0433]: failed to resolve: use of undeclared crate or module `tokio`
--> src/tokio_tungstenite.rs:3:5
|
3 | use tokio::io::{AsyncRead, AsyncWrite};
| ^^^^^ use of undeclared crate or module `tokio`
error[E0433]: failed to resolve: use of undeclared crate or module `tokio`
--> src/tokio_tungstenite.rs:4:5
|
4 | use tokio::net::TcpStream;
| ^^^^^ use of undeclared crate or module `tokio`
error[E0432]: unresolved import `futures_util`
--> src/tokio_tungstenite.rs:2:5
|
2 | use futures_util::SinkExt;
| ^^^^^^^^^^^^ use of undeclared crate or module `futures_util`