resolve couple pedantic clippy lints, remove unnecessary qualifications
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
6d7ef80aba
commit
9d0b647911
35 changed files with 127 additions and 148 deletions
|
@ -45,17 +45,20 @@ impl Service {
|
|||
async fn typings_maintain(&self, room_id: &RoomId) -> Result<()> {
|
||||
let current_timestamp = utils::millis_since_unix_epoch();
|
||||
let mut removable = Vec::new();
|
||||
|
||||
{
|
||||
let typing = self.typing.read().await;
|
||||
let Some(room) = typing.get(room_id) else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
for (user, timeout) in room {
|
||||
if *timeout < current_timestamp {
|
||||
removable.push(user.clone());
|
||||
}
|
||||
}
|
||||
drop(typing)
|
||||
|
||||
drop(typing);
|
||||
};
|
||||
|
||||
if !removable.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue