style: Reformat

This commit is contained in:
timedout authored and Jade Ellis committed 2026-10-14 10:34:50 +01:00
1 parent e001e4a68a
commit 7b180667e8
11 files changed
+33 -42

No files matched your search

+1 -2
View File
@@ -380,6 +380,5 @@ pub(crate) async fn is_ignored_invite(
services
.users
.invite_filter_level(&sender_user, recipient_user)
.await
== FilterLevel::Ignore
.await == FilterLevel::Ignore
}
+5 -6
View File
@@ -305,8 +305,8 @@ pub(crate) async fn upgrade_room_route(
return Err!(Request(Forbidden("Upgrading the admin room this way is not allowed.")));
}
// 1. Check that the user has permission to send m.room.tombstone events in
// the room.
// 1. Check that the user has permission to send m.room.tombstone events in the
// room.
let old_room_state_lock = services.rooms.state.mutex.lock(body.room_id.as_str()).await;
// Check tombstone permission by attempting to create (but not send) the
@@ -556,8 +556,8 @@ pub(crate) async fn upgrade_room_route(
)?;
}
// 5. Send a `m.room.tombstone` event to the old room to indicate that it is
// not intended to be used any further.
// 5. Send a `m.room.tombstone` event to the old room to indicate that it is not
// intended to be used any further.
debug!(target=?body.room_id, "Sending tombstone to old room");
services
.rooms
@@ -598,8 +598,7 @@ pub(crate) async fn upgrade_room_route(
power_levels.events_default = new_level;
power_levels.invite = new_level;
// 6. Modify the power levels in the old room to prevent sending of events
// and
// 6. Modify the power levels in the old room to prevent sending of events and
// inviting new users
// Spec dictates that this is allowed to fail.
debug!(target=?body.room_id, ?new_level, "Raising power level in old room to lock it");
+2 -2
View File
@@ -74,8 +74,8 @@ pub(super) async fn load_left_room(
// return early if:
// - this is an initial sync and the room filter doesn't include leaves, or
// - this is an incremental sync, and we've already synced the leave, and
// the room filter doesn't include leaves
// - this is an incremental sync, and we've already synced the leave, and the
// room filter doesn't include leaves
if last_sync_end_count.is_none_or(|last_sync_end_count| last_sync_end_count >= left_count)
&& !filter.room.include_leave
{
+1 -2
View File
@@ -726,8 +726,7 @@ async fn stripped_state_event(
.get_field::<StateEventType>("type")
.ok()
.flatten()
.as_ref()
== Some(event_type)
.as_ref() == Some(event_type)
})
}