fix arithmetic side-effects

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-07 04:46:16 +00:00
parent 52a561ff9e
commit 7397064edd
25 changed files with 139 additions and 114 deletions

View file

@ -7,7 +7,7 @@ use std::{
sync::Arc,
};
use conduit::debug_info;
use conduit::{checked, debug_info};
use lru_cache::LruCache;
use ruma::{
api::{
@ -508,7 +508,8 @@ impl Service {
}
// We have reached the room after where we last left off
if parents.len() + 1 == short_room_ids.len() {
let parents_len = parents.len();
if checked!(parents_len + 1)? == short_room_ids.len() {
populate_results = true;
}
}