refactor: Replace remaining std RwLocks

This commit is contained in:
Jade Ellis 2025-07-19 22:20:26 +01:00
commit 6d29098d1a
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
11 changed files with 32 additions and 90 deletions

View file

@ -160,7 +160,6 @@ pub async fn handle_incoming_pdu<'a>(
.globals
.bad_event_ratelimiter
.write()
.expect("locked")
.entry(prev_id.into())
{
| hash_map::Entry::Vacant(e) => {
@ -181,13 +180,11 @@ pub async fn handle_incoming_pdu<'a>(
let start_time = Instant::now();
self.federation_handletime
.write()
.expect("locked")
.insert(room_id.into(), (event_id.to_owned(), start_time));
defer! {{
self.federation_handletime
.write()
.expect("locked")
.remove(room_id);
}};