Spacing/formatting adjustments.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-08 12:27:29 +00:00
parent ae707ab465
commit 23d188f612
8 changed files with 9 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ pub async fn make_user_admin(&self, user_id: &UserId) -> Result {
{
return Err!(debug_warn!("User is already joined in the admin room"));
}
if self
.services
.state_cache
@@ -132,6 +133,7 @@ pub async fn make_user_admin(&self, user_id: &UserId) -> Result {
.config
.admin_room_tag
.as_str();
if !room_tag.is_empty() {
if let Err(e) = self
.set_room_tag(&room_id, user_id, room_tag)

View File

@@ -428,6 +428,7 @@ impl Service {
.services
.write()
.expect("locked for writing");
let weak = services.map(Arc::downgrade);
*receiver = weak;
}

View File

@@ -157,6 +157,7 @@ async fn get_auth_chain_outer(
let auth_chain = self
.get_auth_chain_inner(room_id, event_id)
.await?;
self.cache_auth_chain_vec(vec![shortid], auth_chain.as_slice());
debug!(
?event_id,

View File

@@ -90,6 +90,7 @@ impl crate::Service for Service {
.read()
.expect("locked for reading")
.len();
writeln!(out, "federation_handletime: {federation_handletime}")?;
Ok(())

View File

@@ -225,6 +225,7 @@ impl Service {
} else {
(state_ids_compressed, Arc::new(CompressedState::new()))
};
self.services
.state_compressor
.save_state_from_diff(

View File

@@ -86,7 +86,6 @@ pub async fn create_hash_and_sign_event(
.saturating_add(uint!(1));
let mut unsigned = unsigned.unwrap_or_default();
if let Some(state_key) = &state_key {
if let Ok(prev_pdu) = self
.services

View File

@@ -184,6 +184,7 @@ impl Service {
.into_iter()
.map(|(_, event)| event)
.collect();
futures.push(self.send_events(dest.clone(), new_events_vec));
} else {
statuses.remove(dest);

View File

@@ -117,6 +117,7 @@ impl Services {
self.admin
.set_services(Some(Arc::clone(self)).as_ref());
super::migrations::migrations(self).await?;
self.manager
.lock()
@@ -137,6 +138,7 @@ impl Services {
}
debug_info!("Services startup complete.");
Ok(Arc::clone(self))
}