mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
Reduce dependency on futures-util (#3358)
This commit is contained in:
@@ -6,6 +6,7 @@ publish = false
|
||||
|
||||
[dependencies]
|
||||
axum = { path = "../../axum", features = ["ws"] }
|
||||
futures = "0.3"
|
||||
futures-channel = "0.3"
|
||||
futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
tokio-tungstenite = "0.26"
|
||||
|
||||
@@ -13,7 +13,7 @@ use axum::{
|
||||
routing::get,
|
||||
Router,
|
||||
};
|
||||
use futures::{Sink, SinkExt, Stream, StreamExt};
|
||||
use futures_util::{Sink, SinkExt, Stream, StreamExt};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
@@ -131,8 +131,8 @@ mod tests {
|
||||
async fn unit_test() {
|
||||
// Need to use "futures" channels rather than "tokio" channels as they implement `Sink` and
|
||||
// `Stream`
|
||||
let (socket_write, mut test_rx) = futures::channel::mpsc::channel(1024);
|
||||
let (mut test_tx, socket_read) = futures::channel::mpsc::channel(1024);
|
||||
let (socket_write, mut test_rx) = futures_channel::mpsc::channel(1024);
|
||||
let (mut test_tx, socket_read) = futures_channel::mpsc::channel(1024);
|
||||
|
||||
tokio::spawn(unit_testable_handle_socket(socket_write, socket_read));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user