From 8a561fcd3aea41e8ed6c15625e88368b31c503b1 Mon Sep 17 00:00:00 2001 From: Ginger Date: Wed, 31 Dec 2025 00:14:04 -0500 Subject: [PATCH] chore: Clippy fixes --- src/admin/context.rs | 1 - src/service/admin/mod.rs | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/admin/context.rs b/src/admin/context.rs index 16ee0202..458f57ef 100644 --- a/src/admin/context.rs +++ b/src/admin/context.rs @@ -56,7 +56,6 @@ impl Context<'_> { /// self.bail_restricted()?; /// // actual command impl /// ``` - #[must_use] pub(crate) fn bail_restricted(&self) -> Result { if self.source.allows_restricted() { Ok(()) diff --git a/src/service/admin/mod.rs b/src/service/admin/mod.rs index ac7447b5..df0034f0 100644 --- a/src/service/admin/mod.rs +++ b/src/service/admin/mod.rs @@ -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 @@ impl Service { } // Looks good - return Some(InvocationSource::AdminRoom); + Some(InvocationSource::AdminRoom) } else { // This is a message outside the admin room @@ -570,7 +571,7 @@ impl Service { } // Looks good - return Some(InvocationSource::EscapedCommand); + Some(InvocationSource::EscapedCommand) } }