chore: Fix typos across the codebase

This commit is contained in:
Jade Ellis 2025-05-06 20:51:12 +01:00
parent d78fc53577
commit 01594a6243
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
21 changed files with 55 additions and 43 deletions

View file

@ -25,7 +25,7 @@ pub(super) async fn console_auto_stop(&self) {
/// Execute admin commands after startup
#[implement(super::Service)]
pub(super) async fn startup_execute(&self) -> Result {
// List of comamnds to execute
// List of commands to execute
let commands = &self.services.server.config.admin_execute;
// Determine if we're running in smoketest-mode which will change some behaviors
@ -64,7 +64,7 @@ pub(super) async fn startup_execute(&self) -> Result {
/// Execute admin commands after signal
#[implement(super::Service)]
pub(super) async fn signal_execute(&self) -> Result {
// List of comamnds to execute
// List of commands to execute
let commands = self.services.server.config.admin_signal_execute.clone();
// When true, errors are ignored and execution continues.

View file

@ -166,7 +166,7 @@ impl Service {
.map_err(|e| err!("Failed to enqueue admin command: {e:?}"))
}
/// Dispatches a comamnd to the processor on the current task and waits for
/// Dispatches a command to the processor on the current task and waits for
/// completion.
pub async fn command_in_place(
&self,

View file

@ -26,7 +26,7 @@ impl NamespaceRegex {
false
}
/// Checks if this namespace has exlusive rights to a namespace
/// Checks if this namespace has exclusive rights to a namespace
#[inline]
#[must_use]
pub fn is_exclusive_match(&self, heystack: &str) -> bool {

View file

@ -338,7 +338,7 @@ fn handle_federation_error(
return fallback();
}
// Reached for 5xx errors. This is where we don't fallback given the likelyhood
// Reached for 5xx errors. This is where we don't fallback given the likelihood
// the other endpoint will also be a 5xx and we're wasting time.
error
}
@ -356,7 +356,7 @@ pub async fn fetch_remote_thumbnail_legacy(
self.check_legacy_freeze()?;
self.check_fetch_authorized(&mxc)?;
let reponse = self
let response = self
.services
.sending
.send_federation_request(mxc.server_name, media::get_content_thumbnail::v3::Request {
@ -373,10 +373,17 @@ pub async fn fetch_remote_thumbnail_legacy(
.await?;
let dim = Dim::from_ruma(body.width, body.height, body.method.clone())?;
self.upload_thumbnail(&mxc, None, None, reponse.content_type.as_deref(), &dim, &reponse.file)
.await?;
self.upload_thumbnail(
&mxc,
None,
None,
response.content_type.as_deref(),
&dim,
&response.file,
)
.await?;
Ok(reponse)
Ok(response)
}
#[implement(super::Service)]

View file

@ -296,7 +296,7 @@ impl super::Service {
expire: CachedOverride::default_expire(),
overriding: (hostname != untername)
.then_some(hostname.into())
.inspect(|_| debug_info!("{untername:?} overriden by {hostname:?}")),
.inspect(|_| debug_info!("{untername:?} overridden by {hostname:?}")),
});
Ok(())

View file

@ -399,7 +399,7 @@ async fn get_room_summary(
Ok(summary)
}
/// With the given identifier, checks if a room is accessable
/// With the given identifier, checks if a room is accessible
#[implement(Service)]
async fn is_accessible_child<'a, I>(
&self,

View file

@ -267,15 +267,15 @@ impl Service {
///
/// Returns pdu id
#[tracing::instrument(level = "debug", skip_all)]
pub async fn append_pdu<'a, Leafs>(
pub async fn append_pdu<'a, Leaves>(
&'a self,
pdu: &'a PduEvent,
mut pdu_json: CanonicalJsonObject,
leafs: Leafs,
leaves: Leaves,
state_lock: &'a RoomMutexGuard,
) -> Result<RawPduId>
where
Leafs: Iterator<Item = &'a EventId> + Send + 'a,
Leaves: Iterator<Item = &'a EventId> + Send + 'a,
{
// Coalesce database writes for the remainder of this scope.
let _cork = self.db.db.cork_and_flush();
@ -344,7 +344,7 @@ impl Service {
self.services
.state
.set_forward_extremities(&pdu.room_id, leafs, state_lock)
.set_forward_extremities(&pdu.room_id, leaves, state_lock)
.await;
let insert_lock = self.mutex_insert.lock(&pdu.room_id).await;
@ -951,17 +951,17 @@ impl Service {
/// Append the incoming event setting the state snapshot to the state from
/// the server that sent the event.
#[tracing::instrument(level = "debug", skip_all)]
pub async fn append_incoming_pdu<'a, Leafs>(
pub async fn append_incoming_pdu<'a, Leaves>(
&'a self,
pdu: &'a PduEvent,
pdu_json: CanonicalJsonObject,
new_room_leafs: Leafs,
new_room_leaves: Leaves,
state_ids_compressed: Arc<CompressedState>,
soft_fail: bool,
state_lock: &'a RoomMutexGuard,
) -> Result<Option<RawPduId>>
where
Leafs: Iterator<Item = &'a EventId> + Send + 'a,
Leaves: Iterator<Item = &'a EventId> + Send + 'a,
{
// We append to state before appending the pdu, so we don't have a moment in
// time with the pdu without it's state. This is okay because append_pdu can't
@ -978,14 +978,14 @@ impl Service {
self.services
.state
.set_forward_extremities(&pdu.room_id, new_room_leafs, state_lock)
.set_forward_extremities(&pdu.room_id, new_room_leaves, state_lock)
.await;
return Ok(None);
}
let pdu_id = self
.append_pdu(pdu, pdu_json, new_room_leafs, state_lock)
.append_pdu(pdu, pdu_json, new_room_leaves, state_lock)
.await?;
Ok(Some(pdu_id))