mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
database: Switch to tokio channels
This commit is contained in:
parent
641a6306ec
commit
d9746c8ab4
3 changed files with 3 additions and 4 deletions
|
|
@ -6,9 +6,9 @@ edition = "2018"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
diesel = { version = "1.4.5", features = ["sqlite"] }
|
diesel = { version = "1.4.5", features = ["sqlite"] }
|
||||||
diesel_migrations = "1.4.0"
|
diesel_migrations = "1.4.0"
|
||||||
futures-channel = "0.3.5"
|
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
serde = { version = "1.0.117", features = ["derive"] }
|
serde = { version = "1.0.117", features = ["derive"] }
|
||||||
serde_json = "1.0.59"
|
serde_json = "1.0.59"
|
||||||
thiserror = "1.0.23"
|
thiserror = "1.0.23"
|
||||||
|
tokio = { version = "1.4.0", features = ["sync"] }
|
||||||
uuid = { version = "0.8", features = ["v4"] }
|
uuid = { version = "0.8", features = ["v4"] }
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ pub enum Error {
|
||||||
SendError(#[from] std::sync::mpsc::SendError<super::thread::Action>),
|
SendError(#[from] std::sync::mpsc::SendError<super::thread::Action>),
|
||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
ReceiveError(#[from] futures_channel::oneshot::Canceled),
|
ReceiveError(#[from] tokio::sync::oneshot::error::RecvError),
|
||||||
|
|
||||||
#[error("Database error: {0}")]
|
#[error("Database error: {0}")]
|
||||||
Other(String),
|
Other(String),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
use futures_channel::oneshot;
|
use tokio::sync::oneshot::{self, Sender};
|
||||||
use futures_channel::oneshot::Sender;
|
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue