fix arithmetic side-effects
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
52a561ff9e
commit
7397064edd
25 changed files with 139 additions and 114 deletions
|
@ -205,7 +205,7 @@ impl Service {
|
|||
if let Ok(relations) = self.db.relations_until(user_id, room_id, target, until) {
|
||||
for relation in relations.flatten() {
|
||||
if stack_pdu.1 < max_depth {
|
||||
stack.push((relation.clone(), stack_pdu.1 + 1));
|
||||
stack.push((relation.clone(), stack_pdu.1.saturating_add(1)));
|
||||
}
|
||||
|
||||
pdus.push(relation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue