chore: Reformat with latest nightly

This commit is contained in:
Ginger committed 2026-09-01 12:55:05 -04:00
1 parent 03d669594e
commit 9fbabe2210
113 files changed
+981 -831

No files matched your search

+9 -7
View File
@@ -206,8 +206,9 @@ impl crate::Context<'_> {
let first_seen = scheduled.insert(auth_event_id.clone());
let auth_pdu = if let Some(auth_pdu) = cached_events.get(&auth_event_id) {
// NOTE: events might be referenced multiple times (like the create event)
// so this saves some cheeky db lookup time
// NOTE: events might be referenced multiple times (like the
// create event) so this saves some cheeky db lookup
// time
Some(auth_pdu.clone())
} else if first_seen {
match self.services.rooms.timeline.get_pdu(&auth_event_id).await {
@@ -221,9 +222,10 @@ impl crate::Context<'_> {
None
};
// NOTE: Depth is used as the primary sorting key here, even though it has no
// bearing on state resolution or anything. Timestamp is used as a
// tiebreaker, failing back to lexicographical comparison.
// NOTE: Depth is used as the primary sorting key here, even
// though it has no bearing on state resolution or anything.
// Timestamp is used as a tiebreaker, failing back to
// lexicographical comparison.
let (depth, ts) = auth_pdu
.as_ref()
.map_or((UInt::MAX, UInt::MAX), |pdu| (pdu.depth, pdu.origin_server_ts));
@@ -254,8 +256,8 @@ impl crate::Context<'_> {
// We have this PDU so will want to traverse it.
stack.push(child_pdu);
} else {
// We don't have this PDU locally so we can't traverse its auth events,
// but we can still render it as a node.
// We don't have this PDU locally so we can't traverse its
// auth events, but we can still render it as a node.
render_node(
&mut graph,
&child.node_id,
+4 -2
View File
@@ -361,7 +361,8 @@ impl crate::Context<'_> {
.fetch_remote_content(&mxc, None, server.as_deref(), timeout)
.await?;
// Grab the length of the content before clearing it to not flood the output
// Grab the length of the content before clearing it to not flood the
// output
let len = result.content.as_ref().expect("content").len();
result.content.as_mut().expect("content").clear();
@@ -386,7 +387,8 @@ impl crate::Context<'_> {
.fetch_remote_thumbnail(&mxc, None, server.as_deref(), timeout, &dim)
.await?;
// Grab the length of the content before clearing it to not flood the output
// Grab the length of the content before clearing it to not flood the
// output
let len = result.content.as_ref().expect("content").len();
result.content.as_mut().expect("content").clear();
+2 -1
View File
@@ -14,7 +14,8 @@ impl crate::Context<'_> {
include_empty: bool,
no_details: bool,
) -> Result {
// TODO: i know there's a way to do this with clap, but i can't seem to find it
// TODO: i know there's a way to do this with clap, but i can't seem to
// find it
let page = page.unwrap_or(1);
let mut rooms = self
.services
+2 -1
View File
@@ -37,7 +37,8 @@ pub(super) async fn process(command: RoomDirectoryCommand, context: &Context<'_>
context.write_str("Room unpublished").await
},
| RoomDirectoryCommand::List { page } => {
// TODO: i know there's a way to do this with clap, but i can't seem to find it
// TODO: i know there's a way to do this with clap, but i can't seem
// to find it
let page = page.unwrap_or(1);
let mut rooms: Vec<_> = services
.rooms
+3 -2
View File
@@ -28,8 +28,9 @@ impl crate::Context<'_> {
}
pub(super) async fn reload_config(&self, path: Option<PathBuf>) -> Result {
// The path argument is only what's optionally passed via the admin command,
// so we need to merge it with the existing paths if any were given at startup.
// The path argument is only what's optionally passed via the admin
// command, so we need to merge it with the existing paths if any were
// given at startup.
let mut paths = Vec::new();
// Add previously saved paths to the argument list