refactor: small dependency optimizations
This commit is contained in:
parent
8ec1610b2e
commit
1c07957c4e
5 changed files with 7 additions and 12 deletions
|
@ -22,7 +22,6 @@ clap = { version = "4.5", features = ["derive"] }
|
|||
log = "0.4"
|
||||
|
||||
# async
|
||||
futures = "0.3"
|
||||
tokio = { version = "1.46", features = ["full"] }
|
||||
futures-util = "0.3.31"
|
||||
|
||||
|
@ -31,7 +30,6 @@ serde = { version = "1.0", features = ["derive"] }
|
|||
serde_json = "1.0"
|
||||
toml = "0.9"
|
||||
bytes = "1.10.1"
|
||||
rmpv = { version = "1.3.0", features = ["with-serde"] }
|
||||
|
||||
# File Storage
|
||||
bindet = "0.3.2"
|
||||
|
@ -39,8 +37,8 @@ bunny-api-tokio = { version = "0.4", features = ["edge_storage"], default-featur
|
|||
|
||||
# Web Server
|
||||
axum = { version = "0.8.4", features = ["multipart", "ws"] }
|
||||
tower-http = { version = "0.6.6", features = ["cors"] }
|
||||
axum-extra = { version = "0.10.1", features = ["cookie", "typed-header"] }
|
||||
tower-http = { version = "0.6.6", features = ["cors"] }
|
||||
#socketioxide = { version = "0.17.2", features = ["state"] }
|
||||
url = { version = "2.5", features = ["serde"] }
|
||||
time = "0.3.41"
|
||||
|
@ -63,5 +61,3 @@ lettre = { version = "0.11", features = ["tokio1", "tokio1-native-tls"] }
|
|||
chrono = { version = "0.4.41", features = ["serde"] }
|
||||
tracing-subscriber = "0.3.19"
|
||||
rand = "0.9.1"
|
||||
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@ use axum::{
|
|||
http::HeaderMap,
|
||||
response::IntoResponse,
|
||||
};
|
||||
use futures::SinkExt;
|
||||
use futures_util::StreamExt as _;
|
||||
use futures_util::{SinkExt, StreamExt};
|
||||
use serde::Deserialize;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ impl Channel {
|
|||
c.clone().build(&mut conn).await
|
||||
});
|
||||
|
||||
futures::future::try_join_all(channel_futures).await
|
||||
futures_util::future::try_join_all(channel_futures).await
|
||||
}
|
||||
|
||||
pub async fn fetch_one(app_state: &AppState, channel_uuid: Uuid) -> Result<Self, Error> {
|
||||
|
@ -267,7 +267,7 @@ impl Channel {
|
|||
|
||||
let message_futures = messages.iter().map(async move |b| b.build(app_state).await);
|
||||
|
||||
futures::future::try_join_all(message_futures).await
|
||||
futures_util::future::try_join_all(message_futures).await
|
||||
}
|
||||
|
||||
pub async fn new_message(
|
||||
|
|
|
@ -96,7 +96,7 @@ impl Guild {
|
|||
});
|
||||
|
||||
// Execute all futures concurrently and collect results
|
||||
futures::future::try_join_all(guild_futures).await
|
||||
futures_util::future::try_join_all(guild_futures).await
|
||||
}
|
||||
|
||||
pub async fn new(conn: &mut Conn, name: String, owner_uuid: Uuid) -> Result<Self, Error> {
|
||||
|
|
|
@ -391,13 +391,13 @@ impl Me {
|
|||
User::fetch_one_with_friendship(app_state, self, friend.uuid2).await
|
||||
});
|
||||
|
||||
let mut friends = futures::future::try_join_all(friend_futures).await?;
|
||||
let mut friends = futures_util::future::try_join_all(friend_futures).await?;
|
||||
|
||||
let friend_futures = friends2.iter().map(async move |friend| {
|
||||
User::fetch_one_with_friendship(app_state, self, friend.uuid1).await
|
||||
});
|
||||
|
||||
friends.append(&mut futures::future::try_join_all(friend_futures).await?);
|
||||
friends.append(&mut futures_util::future::try_join_all(friend_futures).await?);
|
||||
|
||||
Ok(friends)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue