mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
refactor: Ruma upstreaming, half-baked edition
Co-authored-by: Jade Ellis <jade@ellis.link>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user