Skip to content

Commit

Permalink
Merge pull request #2841 from fermyon/fix-new-warning
Browse files Browse the repository at this point in the history
Fix warning from redis crate.
  • Loading branch information
rylev authored Sep 18, 2024
2 parents 90a2adb + 006c8bb commit 1e3d971
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/factor-outbound-redis/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ impl v2::HostConnection for crate::InstanceState {
payload: Vec<u8>,
) -> Result<(), Error> {
let conn = self.get_conn(connection).await.map_err(other_error)?;
conn.publish(&channel, &payload)
// The `let () =` syntax is needed to suppress a warning when the result type is inferred.
// You can read more about the issue here: <https://github.com/redis-rs/redis-rs/issues/1228>
let () = conn
.publish(&channel, &payload)
.await
.map_err(other_error)?;
Ok(())
Expand All @@ -99,7 +102,9 @@ impl v2::HostConnection for crate::InstanceState {
value: Vec<u8>,
) -> Result<(), Error> {
let conn = self.get_conn(connection).await.map_err(other_error)?;
conn.set(&key, &value).await.map_err(other_error)?;
// The `let () =` syntax is needed to suppress a warning when the result type is inferred.
// You can read more about the issue here: <https://github.com/redis-rs/redis-rs/issues/1228>
let () = conn.set(&key, &value).await.map_err(other_error)?;
Ok(())
}

Expand Down

0 comments on commit 1e3d971

Please sign in to comment.