diff --git a/database/Cargo.toml b/database/Cargo.toml index dc68abb..16188ba 100644 --- a/database/Cargo.toml +++ b/database/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] diesel = { version = "1.4.5", features = ["sqlite"] } diesel_migrations = "1.4.0" -futures-channel = "0.3.5" rand = "0.7.3" serde = { version = "1.0.117", features = ["derive"] } serde_json = "1.0.59" thiserror = "1.0.23" +tokio = { version = "1.4.0", features = ["sync"] } uuid = { version = "0.8", features = ["v4"] } diff --git a/database/src/error.rs b/database/src/error.rs index c9c343f..5c6734d 100644 --- a/database/src/error.rs +++ b/database/src/error.rs @@ -14,7 +14,7 @@ pub enum Error { SendError(#[from] std::sync::mpsc::SendError), #[error(transparent)] - ReceiveError(#[from] futures_channel::oneshot::Canceled), + ReceiveError(#[from] tokio::sync::oneshot::error::RecvError), #[error("Database error: {0}")] Other(String), diff --git a/database/src/thread.rs b/database/src/thread.rs index 4b72578..e16b4c4 100644 --- a/database/src/thread.rs +++ b/database/src/thread.rs @@ -1,6 +1,5 @@ use super::*; -use futures_channel::oneshot; -use futures_channel::oneshot::Sender; +use tokio::sync::oneshot::{self, Sender}; use std::sync::mpsc; use std::thread;