Skip to content

Commit

Permalink
fix: redis_connection 関数呼び出し時の型引数を明示
Browse files Browse the repository at this point in the history
rust-lang/rust#123748
によると、関数の戻り値が ()
であることを期待することを暗黙的にすることが期待されていなくなった。
  • Loading branch information
rito528 committed Dec 4, 2024
1 parent 39ed821 commit a51875f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ deriving_via = "1.6.1"
reqwest = { version = "0.12.0", default-features = false, features = ["rustls-tls", "json"] }
num-traits = "0.2.18"
regex = "1.10.3"
redis = { version = "0.27.0", features = ["tokio-comp", "json"] }
redis = { version = "0.27.6", features = ["tokio-comp", "json"] }
meilisearch-sdk = "0.27.1"
6 changes: 3 additions & 3 deletions server/infra/resource/src/database/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ impl UserDatabase for ConnectionPool {

let mut redis_connection = redis_connection().await;

redis_connection.json_set(&session_id, "$", user)?;
redis_connection.json_set::<&str, &str, _, ()>(&session_id, "$", user)?;

redis_connection.expire(&session_id, expires as i64)?;
redis_connection.expire::<&str, ()>(&session_id, expires as i64)?;
Ok(session_id)
}

Expand All @@ -145,7 +145,7 @@ impl UserDatabase for ConnectionPool {
async fn end_user_session(&self, session_id: String) -> Result<(), InfraError> {
let mut redis_connection = redis_connection().await;

redis_connection.del(&session_id)?;
redis_connection.del::<&str, ()>(&session_id)?;

Ok(())
}
Expand Down

0 comments on commit a51875f

Please sign in to comment.