Skip to content

Commit

Permalink
cargo update and fix for rust-lang/rust#123748
Browse files Browse the repository at this point in the history
  • Loading branch information
cutsea110 committed Sep 21, 2024
1 parent 366d38a commit 49d6013
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions app/redis_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ impl PersonCao<redis::Connection> for RedisPersonCao {
trace!("load person: {}", id);
tx_rs::with_tx(move |conn: &mut redis::Connection| {
let key = format!("person:{}", id);
conn.set(&key, &person)
// NOTE: this is current workaround for: https://github.com/rust-lang/rust/issues/123748
// reference: https://github.com/redis-rs/redis-rs/issues/1322
let _: () = conn
.set(&key, &person)
.map_err(|e| CaoError::Unavailable(e.to_string()))?;
trace!("person loaded into cache: {:?}", person);
Ok(())
Expand All @@ -87,7 +90,10 @@ impl PersonCao<redis::Connection> for RedisPersonCao {
trace!("unload person: {}", id);
tx_rs::with_tx(move |conn: &mut redis::Connection| {
let key = format!("person:{}", id);
conn.del(&key)
// NOTE: this is current workaround for: https://github.com/rust-lang/rust/issues/123748
// reference: https://github.com/redis-rs/redis-rs/issues/1322
let _: () = conn
.del(&key)
.map_err(|e| CaoError::Unavailable(e.to_string()))?;
trace!("person unloaded from cache: {}", id);
Ok(())
Expand Down

0 comments on commit 49d6013

Please sign in to comment.