mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
enable let_underscore_must_use lint
This commit is contained in:
parent
2ded335adb
commit
052f3088e9
12 changed files with 69 additions and 32 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use ruma::{events::SyncEphemeralRoomEvent, OwnedRoomId, OwnedUserId, RoomId, UserId};
|
||||
use std::collections::BTreeMap;
|
||||
use tokio::sync::{broadcast, RwLock};
|
||||
use tracing::trace;
|
||||
|
||||
use crate::{services, utils, Result};
|
||||
|
||||
|
|
@ -29,7 +30,9 @@ impl Service {
|
|||
.write()
|
||||
.await
|
||||
.insert(room_id.to_owned(), services().globals.next_count()?);
|
||||
let _ = self.typing_update_sender.send(room_id.to_owned());
|
||||
if self.typing_update_sender.send(room_id.to_owned()).is_err() {
|
||||
trace!("receiver found what it was looking for and is no longer interested");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +48,9 @@ impl Service {
|
|||
.write()
|
||||
.await
|
||||
.insert(room_id.to_owned(), services().globals.next_count()?);
|
||||
let _ = self.typing_update_sender.send(room_id.to_owned());
|
||||
if self.typing_update_sender.send(room_id.to_owned()).is_err() {
|
||||
trace!("receiver found what it was looking for and is no longer interested");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +91,9 @@ impl Service {
|
|||
.write()
|
||||
.await
|
||||
.insert(room_id.to_owned(), services().globals.next_count()?);
|
||||
let _ = self.typing_update_sender.send(room_id.to_owned());
|
||||
if self.typing_update_sender.send(room_id.to_owned()).is_err() {
|
||||
trace!("receiver found what it was looking for and is no longer interested");
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1533,19 +1533,22 @@ impl Service {
|
|||
|
||||
// Try to fetch keys, failure is okay
|
||||
// Servers we couldn't find in the cache will be added to `servers`
|
||||
for pdu in &event.room_state.state {
|
||||
let _ = self
|
||||
for pdu in event
|
||||
.room_state
|
||||
.state
|
||||
.iter()
|
||||
.chain(&event.room_state.auth_chain)
|
||||
{
|
||||
if let Err(error) = self
|
||||
.get_server_keys_from_cache(pdu, &mut servers, room_version, &mut pkm)
|
||||
.await;
|
||||
}
|
||||
for pdu in &event.room_state.auth_chain {
|
||||
let _ = self
|
||||
.get_server_keys_from_cache(pdu, &mut servers, room_version, &mut pkm)
|
||||
.await;
|
||||
.await
|
||||
{
|
||||
debug!(%error, "failed to get server keys from cache");
|
||||
};
|
||||
}
|
||||
|
||||
drop(pkm);
|
||||
}
|
||||
};
|
||||
|
||||
if servers.is_empty() {
|
||||
info!("We had all keys locally");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue