Remove futures dependency

Use tokio::join instead of futures::join
This commit is contained in:
Ethan Girouard 2024-05-16 19:23:48 -04:00
parent 12384b5a75
commit 8ffe09381c
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146
3 changed files with 1 additions and 4 deletions

1
Cargo.lock generated
View File

@ -1576,7 +1576,6 @@ dependencies = [
"diesel_migrations", "diesel_migrations",
"dotenv", "dotenv",
"flexi_logger", "flexi_logger",
"futures",
"http", "http",
"icondata", "icondata",
"lazy_static", "lazy_static",

View File

@ -26,7 +26,6 @@ openssl = { version = "0.10.63", optional = true }
time = { version = "0.3.34", features = ["serde"], default-features = false } time = { version = "0.3.34", features = ["serde"], default-features = false }
diesel_migrations = { version = "2.1.0", optional = true } diesel_migrations = { version = "2.1.0", optional = true }
pbkdf2 = { version = "0.12.2", features = ["simple"], optional = true } pbkdf2 = { version = "0.12.2", features = ["simple"], optional = true }
futures = { version = "0.3.30", default-features = false, optional = true }
tokio = { version = "1", optional = true, features = ["rt-multi-thread"] } tokio = { version = "1", optional = true, features = ["rt-multi-thread"] }
axum = { version = "0.7.5", optional = true } axum = { version = "0.7.5", optional = true }
tower = { version = "0.4.13", optional = true } tower = { version = "0.4.13", optional = true }
@ -61,7 +60,6 @@ ssr = [
"openssl", "openssl",
"diesel_migrations", "diesel_migrations",
"pbkdf2", "pbkdf2",
"futures",
"tokio", "tokio",
"axum", "axum",
"tower", "tower",

View File

@ -102,7 +102,7 @@ pub async fn search(query: String, limit: i64) -> Result<(Vec<Album>, Vec<Artist
let artists = search_artists(query.clone(), limit); let artists = search_artists(query.clone(), limit);
let songs = search_songs(query.clone(), limit); let songs = search_songs(query.clone(), limit);
use futures::join; use tokio::join;
let (albums, artists, songs) = join!(albums, artists, songs); let (albums, artists, songs) = join!(albums, artists, songs);
Ok((albums?, artists?, songs?)) Ok((albums?, artists?, songs?))