chore: Clippy fixes

This commit is contained in:
Ginger
2025-12-31 00:14:04 -05:00
committed by Jade Ellis
parent 25c305f473
commit 8a561fcd3a
2 changed files with 3 additions and 3 deletions

View File

@@ -56,7 +56,6 @@ pub(crate) fn sender_or_service_user(&self) -> &UserId {
/// self.bail_restricted()?;
/// // actual command impl
/// ```
#[must_use]
pub(crate) fn bail_restricted(&self) -> Result {
if self.source.allows_restricted() {
Ok(())

View File

@@ -81,6 +81,7 @@ impl InvocationSource {
/// Returns whether this invocation source allows "restricted"
/// commands, i.e. ones that could be potentially dangerous if executed by
/// an attacker or in a public room.
#[must_use]
pub fn allows_restricted(&self) -> bool { !matches!(self, Self::EscapedCommand) }
}
@@ -546,7 +547,7 @@ pub async fn is_admin_command<E>(&self, event: &E, body: &str) -> Option<Invocat
}
// Looks good
return Some(InvocationSource::AdminRoom);
Some(InvocationSource::AdminRoom)
} else {
// This is a message outside the admin room
@@ -570,7 +571,7 @@ pub async fn is_admin_command<E>(&self, event: &E, body: &str) -> Option<Invocat
}
// Looks good
return Some(InvocationSource::EscapedCommand);
Some(InvocationSource::EscapedCommand)
}
}