Skip to content

Commit

Permalink
fix: Update to explicitly type RedisError. (#531)
Browse files Browse the repository at this point in the history
Work around for Rust 2024 implementing Never type (!)

rust-lang/rust#123748
  • Loading branch information
chriswk authored Sep 17, 2024
1 parent 77aa9af commit 797fc49
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/src/persistence/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ impl EdgePersistence for RedisPersister {
self.write_timeout,
)
.await?;
conn.set(TOKENS_KEY, raw_tokens).await?;
let res: Result<(), RedisError> = conn.set(TOKENS_KEY, raw_tokens).await;
res?;
}
RedisClientOptions::Cluster(c) => {
let mut conn = c.get_connection()?;
Expand Down Expand Up @@ -154,8 +155,10 @@ impl EdgePersistence for RedisPersister {
}
Cluster(cluster) => {
let mut conn = cluster.get_connection()?;
conn.set(FEATURES_KEY, raw_features)
.map_err(EdgeError::from)?
let res: Result<(), EdgeError> = conn
.set(FEATURES_KEY, raw_features)
.map_err(EdgeError::from);
res?;
}
};
debug!("Done saving to persistence");
Expand Down

0 comments on commit 797fc49

Please sign in to comment.