mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +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 {
|
Box::pin(async move {
|
||||||
let key = chat_id.to_le_bytes();
|
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);
|
return Err(RocksDbStorageError::DialogueNotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.db.delete(&key).unwrap();
|
self.db.delete(key).unwrap();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
@ -92,7 +92,7 @@ where
|
||||||
self.serializer.serialize(&dialogue).map_err(RocksDbStorageError::SerdeError)?;
|
self.serializer.serialize(&dialogue).map_err(RocksDbStorageError::SerdeError)?;
|
||||||
|
|
||||||
let key = chat_id.to_le_bytes();
|
let key = chat_id.to_le_bytes();
|
||||||
self.db.put(&key, &d)?;
|
self.db.put(key, &d)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
@ -105,7 +105,7 @@ where
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
let key = chat_id.to_le_bytes();
|
let key = chat_id.to_le_bytes();
|
||||||
self.db
|
self.db
|
||||||
.get(&key)?
|
.get(key)?
|
||||||
.map(|d| self.serializer.deserialize(&d).map_err(RocksDbStorageError::SerdeError))
|
.map(|d| self.serializer.deserialize(&d).map_err(RocksDbStorageError::SerdeError))
|
||||||
.transpose()
|
.transpose()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue