From 6d15f9b304feccc8d3bb6ec74c331f8ab5ce47e6 Mon Sep 17 00:00:00 2001 From: Aumetra Weisman Date: Tue, 27 Aug 2024 18:36:31 +0200 Subject: [PATCH] fix nightly warnings --- Cargo.lock | 12 ++++++------ crates/kitsune-cache/src/redis.rs | 5 +++-- crates/kitsune-oidc/src/state/store/redis.rs | 3 ++- lib/athena/src/redis/mod.rs | 13 +++++++------ lib/athena/src/redis/scheduled.rs | 2 +- lib/tower-stop-using-brave/Cargo.toml | 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09aa64266..022a67c86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6048,18 +6048,18 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -6116,9 +6116,9 @@ checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring", "rustls-pki-types", diff --git a/crates/kitsune-cache/src/redis.rs b/crates/kitsune-cache/src/redis.rs index 303757775..c30353bf4 100644 --- a/crates/kitsune-cache/src/redis.rs +++ b/crates/kitsune-cache/src/redis.rs @@ -54,7 +54,7 @@ where let key = self.compute_key(key); debug!(%key, "Deleting cache entry"); - self.redis_conn.del(key).await?; + let () = self.redis_conn.del(key).await?; Ok(()) } @@ -78,7 +78,8 @@ where let serialised = sonic_rs::to_string(value)?; debug!(%key, ttl = ?self.ttl, "Setting cache entry"); - self.redis_conn + let () = self + .redis_conn .set( key, serialised, diff --git a/crates/kitsune-oidc/src/state/store/redis.rs b/crates/kitsune-oidc/src/state/store/redis.rs index a86d1e3ff..ceb53668d 100644 --- a/crates/kitsune-oidc/src/state/store/redis.rs +++ b/crates/kitsune-oidc/src/state/store/redis.rs @@ -29,7 +29,8 @@ impl Store for Redis { async fn set(&self, key: &str, value: LoginState) -> Result<()> { let raw_value = sonic_rs::to_string(&value)?; - self.pool + let () = self + .pool .set(Self::format_key(key), raw_value, None, None, false) .await?; diff --git a/lib/athena/src/redis/mod.rs b/lib/athena/src/redis/mod.rs index 6f3b3bcc7..8bda24e6d 100644 --- a/lib/athena/src/redis/mod.rs +++ b/lib/athena/src/redis/mod.rs @@ -105,7 +105,7 @@ where .duration_since(Timestamp::UNIX_EPOCH) .as_seconds_f64(); - client + let () = client .zadd( self.scheduled_queue_name.as_str(), None, @@ -116,7 +116,7 @@ where ) .await?; } else { - client + let () = client .xadd( self.queue_name.as_str(), false, @@ -241,14 +241,14 @@ where let client = self.redis_pool.next(); let pipeline = client.pipeline(); - pipeline + let () = pipeline .xack( self.queue_name.as_str(), self.consumer_group.as_str(), stream_id.as_str(), ) .await?; - pipeline + let () = pipeline .xdel(self.queue_name.as_str(), &[stream_id]) .await?; @@ -279,7 +279,7 @@ where Outcome::Success => true, // Execution succeeded, we don't need the context anymore }; - pipeline.last().await?; + let () = pipeline.last().await?; if remove_context { self.context_repository @@ -297,7 +297,8 @@ where .get::() .expect("[Bug] Not a string in the context"); - self.redis_pool + let () = self + .redis_pool .xclaim( self.queue_name.as_str(), self.consumer_group.as_str(), diff --git a/lib/athena/src/redis/scheduled.rs b/lib/athena/src/redis/scheduled.rs index 156385b80..4a13799c4 100644 --- a/lib/athena/src/redis/scheduled.rs +++ b/lib/athena/src/redis/scheduled.rs @@ -22,7 +22,7 @@ pub struct ScheduledJobActor { impl ScheduledJobActor { async fn run(&mut self) -> Result<()> { let client = self.redis_pool.next(); - SCHEDULE_SCRIPT + let () = SCHEDULE_SCRIPT .evalsha_with_reload( client, (self.queue_name.as_str(), self.scheduled_queue_name.as_str()), diff --git a/lib/tower-stop-using-brave/Cargo.toml b/lib/tower-stop-using-brave/Cargo.toml index 7a21c4484..015bc8894 100644 --- a/lib/tower-stop-using-brave/Cargo.toml +++ b/lib/tower-stop-using-brave/Cargo.toml @@ -7,13 +7,13 @@ license = "MIT OR Apache-2.0" [dependencies] either = "1.13.0" -futures-test = "0.3.30" http = "1.1.0" regex = "1.10.6" tower-layer = "0.3.3" tower-service = "0.3.3" [dev-dependencies] +futures-test = "0.3.30" tower = { version = "0.5.0", default-features = false, features = ["util"] } [lints]