Apply review suggestions

This commit is contained in:
Hirrolot 2024-07-21 08:08:36 +05:00
parent 4d7adcd709
commit 71448b7a0c
No known key found for this signature in database
GPG key ID: F0C33B48BD883C81
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `filter_web_app_data`
- Implement `PostgresStorage`, a persistent dialogue storage based on [PostgreSQL](https://www.postgresql.org/)([PR 996](https://github.com/teloxide/teloxide/pull/996)).
- Implement `GetChatId` for `teloxide_core::types::{Chat, ChatJoinRequest, ChatMemberUpdated}`.
- Use [deadpool-redis](https://crates.io/crates/deadpool-redis) for Redis connection pooling.
- Use [deadpool-redis](https://crates.io/crates/deadpool-redis) for Redis connection pooling ([PR 1081](https://github.com/teloxide/teloxide/pull/1081)).
### Fixed

View file

@ -65,12 +65,12 @@ where
ChatId(chat_id): ChatId,
) -> BoxFuture<'static, Result<(), Self::Error>> {
Box::pin(async move {
let mut pool = self.pool.get().await?;
let mut conn = self.pool.get().await?;
let deleted_rows_count = redis::pipe()
.atomic()
.del(chat_id)
.query_async::<_, redis::Value>(&mut pool)
.query_async::<_, redis::Value>(&mut conn)
.await?;
if let redis::Value::Bulk(values) = deleted_rows_count {