Upgrade to tokio 1.0

This commit is contained in:
Dominik Nakamura 2021-01-10 01:24:53 +09:00
parent 57022743cb
commit 59ab98d840
No known key found for this signature in database
GPG key ID: E4C6A749B2491910
3 changed files with 7 additions and 8 deletions

View file

@ -17,7 +17,7 @@ base64 = "0.13.0"
bitflags = "1.2.1"
chrono = { version = "0.4.19", default-features = false, features = ["std"] }
either = { version = "1.6.1", features = ["serde"] }
futures-util = { version = "0.3.8", features = ["sink"] }
futures-util = { version = "0.3.9", features = ["sink"] }
log = "0.4.11"
rgb = { version = "0.8.25", default-features = false }
semver = { version = "0.11.0", features = ["serde"] }
@ -26,16 +26,15 @@ serde_json = "1.0.61"
serde_with = "1.6.0"
sha2 = "0.9.2"
thiserror = "1.0.23"
tokio = { version = "0.3.6", features = ["net", "sync"] }
tokio-tungstenite = "0.12.0"
tungstenite = { version = "0.11.1", default-features = false }
tokio = { version = "1.0.1", features = ["net", "sync"] }
tokio-tungstenite = "0.13.0"
[dev-dependencies]
anyhow = "1.0.37"
dotenv = "0.15.0"
pretty_env_logger = "0.4.0"
serde_test = "1.0.118"
tokio = { version = "0.3.6", features = ["fs", "macros", "rt-multi-thread", "time"] }
tokio = { version = "1.0.1", features = ["fs", "macros", "rt-multi-thread", "time"] }
[features]
test-integration = []

View file

@ -50,7 +50,7 @@ mod transitions;
#[derive(Debug, thiserror::Error)]
enum InnerError {
#[error("websocket message not convertible to text")]
IntoText(#[source] tungstenite::Error),
IntoText(#[source] tokio_tungstenite::tungstenite::Error),
#[error("failed deserializing message")]
DeserializeMessage(#[source] serde_json::Error),
#[error("failed deserializing event")]

View file

@ -50,13 +50,13 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
pub enum Error {
/// An error occured while trying to connect to the websocket.
#[error("failed to connect to the obs-websocket plugin")]
Connect(#[source] tungstenite::Error),
Connect(#[source] tokio_tungstenite::tungstenite::Error),
/// Failed to serialize the message to be send to the websocket.
#[error("failed to serialize message")]
SerializeMessage(#[source] serde_json::Error),
/// A message could not be send through the websocket.
#[error("failed to send message to the obs-websocket plugin")]
Send(#[source] tungstenite::Error),
Send(#[source] tokio_tungstenite::tungstenite::Error),
/// Tried to receive data while the send side was already closed.
#[error("send side is closed")]
ReceiveMessage(#[source] tokio::sync::oneshot::error::RecvError),