Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all deps #150

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,682 changes: 1,158 additions & 524 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ path = "src/main.rs"
[dependencies]
async-trait = "0.1.74"
axum = { version = "0.7.1" }
base64 = "0.21.5"
base64 = "0.22.1"
bytes = "1.5.0"
chrono = { version = "0.4.26", features = ["serde"] }
clap = { version = "4.3.21", features = ["env", "derive"] }
Expand All @@ -28,11 +28,11 @@ log = "0.4.20"
mime = "0.3.17"
mime_guess = "2.0.4"
mobc = "0.8.3"
redis = { version = "0.24.0", features = ["tokio-comp", "connection-manager"] }
redis = { version = "0.25.3", features = ["tokio-comp", "connection-manager"] }
rustc-hash = "1.1.0"
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"
strum = { version = "0.25.0", features = ["derive"] }
strum = { version = "0.26.2", features = ["derive"] }
thiserror = "1.0.50"
tokio = { version = "1.31.0", features = ["full", "bytes"] }
tokio-util = { version = "0.7.10", features = ["io"] }
Expand All @@ -44,7 +44,7 @@ sha1 = { version = "^0.10.1", features = ["compress"] }
sha2 = { version = "^0.10.1", features = ["compress"] }
md-5 = "^0.10.1"
digest = "^0.10.1"
reqwest = "0.11.22"
reqwest = "0.12.4"
lapin = "2.3.1"
tower-http = { version = "0.5.0", features = ["cors", "trace"] }
wildmatch = "2.1.1"
Expand Down
1 change: 0 additions & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ pub enum RustusError {
}

/// This conversion allows us to use `RustusError` in the `main` function.
#[cfg_attr(coverage, no_coverage)]
impl From<RustusError> for Error {
fn from(err: RustusError) -> Self {
Error::new(ErrorKind::Other, err)
Expand Down
13 changes: 7 additions & 6 deletions src/info_storages/impls/redis_info_storage.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use mobc::{Manager, Pool};
use redis::aio::Connection;
use redis::aio::MultiplexedConnection;

use crate::{
errors::{RustusError, RustusResult},
Expand All @@ -19,11 +19,11 @@ impl RedisConnectionManager {

#[async_trait::async_trait]
impl Manager for RedisConnectionManager {
type Connection = redis::aio::Connection;
type Connection = redis::aio::MultiplexedConnection;
type Error = redis::RedisError;

async fn connect(&self) -> Result<Self::Connection, Self::Error> {
Ok(self.client.get_async_connection().await?)
Ok(self.client.get_multiplexed_async_connection().await?)
}

async fn check(&self, mut conn: Self::Connection) -> Result<Self::Connection, Self::Error> {
Expand Down Expand Up @@ -69,15 +69,16 @@ impl InfoStorage for RedisStorage {
if let Some(expiration) = self.expiration.as_ref() {
cmd = cmd.arg("EX").arg(expiration);
}
cmd.query_async::<Connection, String>(&mut conn).await?;
cmd.query_async::<MultiplexedConnection, String>(&mut conn)
.await?;
Ok(())
}

async fn get_info(&self, file_id: &str) -> RustusResult<FileInfo> {
let mut conn = self.pool.get().await?;
let res = redis::cmd("GET")
.arg(file_id)
.query_async::<Connection, Option<String>>(&mut conn)
.query_async::<MultiplexedConnection, Option<String>>(&mut conn)
.await?;

if let Some(res) = res {
Expand All @@ -91,7 +92,7 @@ impl InfoStorage for RedisStorage {
let mut conn = self.pool.get().await?;
let resp = redis::cmd("DEL")
.arg(file_id)
.query_async::<Connection, Option<usize>>(&mut conn)
.query_async::<MultiplexedConnection, Option<usize>>(&mut conn)
.await?;
match resp {
None | Some(0) => Err(RustusError::FileNotFound),
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod utils;
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

#[cfg_attr(coverage, no_coverage)]
fn greeting(app_conf: &config::Config) {
let extensions = app_conf
.tus_extensions
Expand Down
1 change: 0 additions & 1 deletion src/notifiers/impls/dir_notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ impl DirNotifier {
}

impl Notifier for DirNotifier {
#[cfg_attr(coverage, no_coverage)]
async fn prepare(&mut self) -> RustusResult<()> {
Ok(())
}
Expand Down
1 change: 0 additions & 1 deletion src/notifiers/impls/file_notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ impl FileNotifier {
}

impl Notifier for FileNotifier {
#[cfg_attr(coverage, no_coverage)]
async fn prepare(&mut self) -> RustusResult<()> {
Ok(())
}
Expand Down
1 change: 0 additions & 1 deletion src/notifiers/impls/http_notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ impl HttpNotifier {
}

impl Notifier for HttpNotifier {
#[cfg_attr(coverage, no_coverage)]
async fn prepare(&mut self) -> RustusResult<()> {
Ok(())
}
Expand Down
Loading