Skip to content

Commit 1e3d971

Browse files
authored
Merge pull request #2841 from fermyon/fix-new-warning
Fix warning from redis crate.
2 parents 90a2adb + 006c8bb commit 1e3d971

File tree

1 file changed

+7
-2
lines changed
  • crates/factor-outbound-redis/src

1 file changed

+7
-2
lines changed

crates/factor-outbound-redis/src/host.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ impl v2::HostConnection for crate::InstanceState {
7474
payload: Vec<u8>,
7575
) -> Result<(), Error> {
7676
let conn = self.get_conn(connection).await.map_err(other_error)?;
77-
conn.publish(&channel, &payload)
77+
// The `let () =` syntax is needed to suppress a warning when the result type is inferred.
78+
// You can read more about the issue here: <https://github.com/redis-rs/redis-rs/issues/1228>
79+
let () = conn
80+
.publish(&channel, &payload)
7881
.await
7982
.map_err(other_error)?;
8083
Ok(())
@@ -99,7 +102,9 @@ impl v2::HostConnection for crate::InstanceState {
99102
value: Vec<u8>,
100103
) -> Result<(), Error> {
101104
let conn = self.get_conn(connection).await.map_err(other_error)?;
102-
conn.set(&key, &value).await.map_err(other_error)?;
105+
// The `let () =` syntax is needed to suppress a warning when the result type is inferred.
106+
// You can read more about the issue here: <https://github.com/redis-rs/redis-rs/issues/1228>
107+
let () = conn.set(&key, &value).await.map_err(other_error)?;
103108
Ok(())
104109
}
105110

0 commit comments

Comments
 (0)