Driver, Gateway: Remove tokio 0.2 support (#118)
* Remove tokio 0.2 compat * Remove tokio 0.2 test * Remove tokio 0.2 CI
This commit is contained in:
11
src/ws.rs
11
src/ws.rs
@@ -1,26 +1,15 @@
|
||||
use crate::model::Event;
|
||||
|
||||
use async_trait::async_trait;
|
||||
#[cfg(not(feature = "tokio-02-marker"))]
|
||||
use async_tungstenite::{
|
||||
self as tungstenite,
|
||||
tokio::ConnectStream,
|
||||
tungstenite::{error::Error as TungsteniteError, protocol::CloseFrame, Message},
|
||||
WebSocketStream,
|
||||
};
|
||||
#[cfg(feature = "tokio-02-marker")]
|
||||
use async_tungstenite_compat::{
|
||||
self as tungstenite,
|
||||
tokio::ConnectStream,
|
||||
tungstenite::{error::Error as TungsteniteError, protocol::CloseFrame, Message},
|
||||
WebSocketStream,
|
||||
};
|
||||
use futures::{SinkExt, StreamExt, TryStreamExt};
|
||||
use serde_json::Error as JsonError;
|
||||
#[cfg(not(feature = "tokio-02-marker"))]
|
||||
use tokio::time::{timeout, Duration};
|
||||
#[cfg(feature = "tokio-02-marker")]
|
||||
use tokio_compat::time::{timeout, Duration};
|
||||
use tracing::instrument;
|
||||
|
||||
pub type WsStream = WebSocketStream<ConnectStream>;
|
||||
|
||||
Reference in New Issue
Block a user