refactor: Ruma upstreaming, half-baked edition

Co-authored-by: Jade Ellis <jade@ellis.link>
This commit is contained in:
Ginger
2026-04-28 09:16:51 -04:00
co-authored by Jade Ellis
parent 1cc9dbf2a4
commit 204bc1367e
141 changed files with 2714 additions and 2278 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ impl crate::Service for Service {
let (ber_count, ber_bytes) = self.bad_event_ratelimiter.read().iter().fold(
(0_usize, 0_usize),
|(mut count, mut bytes), (event_id, _)| {
bytes = bytes.saturating_add(event_id.capacity());
bytes = bytes.saturating_add(event_id.as_bytes().len());
bytes = bytes.saturating_add(size_of::<RateLimitState>());
count = count.saturating_add(1);
(count, bytes)