mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
import: Switch to tokio channels
This commit is contained in:
parent
2922c17a86
commit
e43486367b
3 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,6 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.13.0"
|
base64 = "0.13.0"
|
||||||
futures-channel = "0.3.5"
|
|
||||||
glib = { git = "https://github.com/gtk-rs/gtk-rs/", features = ["v2_64"] }
|
glib = { git = "https://github.com/gtk-rs/gtk-rs/", features = ["v2_64"] }
|
||||||
gstreamer = "0.16.5"
|
gstreamer = "0.16.5"
|
||||||
gstreamer-pbutils = "0.16.5"
|
gstreamer-pbutils = "0.16.5"
|
||||||
|
|
@ -14,3 +13,4 @@ once_cell = "1.5.2"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
thiserror = "1.0.23"
|
thiserror = "1.0.23"
|
||||||
sha2 = "0.9.3"
|
sha2 = "0.9.3"
|
||||||
|
tokio = { version = "1.4.0", features = ["sync"] }
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ impl Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<futures_channel::oneshot::Canceled> for Error {
|
impl From<tokio::sync::oneshot::error::RecvError> for Error {
|
||||||
fn from(err: futures_channel::oneshot::Canceled) -> Self {
|
fn from(err: tokio::sync::oneshot::error::RecvError) -> Self {
|
||||||
Self::us(err)
|
Self::us(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::{disc, folder};
|
use crate::{disc, folder};
|
||||||
use crate::error::Result;
|
use crate::error::Result;
|
||||||
use futures_channel::oneshot;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use tokio::sync::oneshot;
|
||||||
|
|
||||||
/// Interface for importing audio tracks from a medium or folder.
|
/// Interface for importing audio tracks from a medium or folder.
|
||||||
pub struct ImportSession {
|
pub struct ImportSession {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue