mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
fix clippy
This commit is contained in:
parent
405cf34f03
commit
d9bd9e131f
1 changed files with 4 additions and 4 deletions
|
@ -72,11 +72,11 @@ where
|
|||
Box::pin(async move {
|
||||
let key = chat_id.to_le_bytes();
|
||||
|
||||
if self.db.get(&key)?.is_none() {
|
||||
if self.db.get(key)?.is_none() {
|
||||
return Err(RocksDbStorageError::DialogueNotFound);
|
||||
}
|
||||
|
||||
self.db.delete(&key).unwrap();
|
||||
self.db.delete(key).unwrap();
|
||||
|
||||
Ok(())
|
||||
})
|
||||
|
@ -92,7 +92,7 @@ where
|
|||
self.serializer.serialize(&dialogue).map_err(RocksDbStorageError::SerdeError)?;
|
||||
|
||||
let key = chat_id.to_le_bytes();
|
||||
self.db.put(&key, &d)?;
|
||||
self.db.put(key, &d)?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
|
@ -105,7 +105,7 @@ where
|
|||
Box::pin(async move {
|
||||
let key = chat_id.to_le_bytes();
|
||||
self.db
|
||||
.get(&key)?
|
||||
.get(key)?
|
||||
.map(|d| self.serializer.deserialize(&d).map_err(RocksDbStorageError::SerdeError))
|
||||
.transpose()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue