mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
chore: Clippy fixes
This commit is contained in:
@@ -56,7 +56,6 @@ impl Context<'_> {
|
|||||||
/// self.bail_restricted()?;
|
/// self.bail_restricted()?;
|
||||||
/// // actual command impl
|
/// // actual command impl
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
|
||||||
pub(crate) fn bail_restricted(&self) -> Result {
|
pub(crate) fn bail_restricted(&self) -> Result {
|
||||||
if self.source.allows_restricted() {
|
if self.source.allows_restricted() {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ impl InvocationSource {
|
|||||||
/// Returns whether this invocation source allows "restricted"
|
/// Returns whether this invocation source allows "restricted"
|
||||||
/// commands, i.e. ones that could be potentially dangerous if executed by
|
/// commands, i.e. ones that could be potentially dangerous if executed by
|
||||||
/// an attacker or in a public room.
|
/// an attacker or in a public room.
|
||||||
|
#[must_use]
|
||||||
pub fn allows_restricted(&self) -> bool { !matches!(self, Self::EscapedCommand) }
|
pub fn allows_restricted(&self) -> bool { !matches!(self, Self::EscapedCommand) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,7 +547,7 @@ impl Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Looks good
|
// Looks good
|
||||||
return Some(InvocationSource::AdminRoom);
|
Some(InvocationSource::AdminRoom)
|
||||||
} else {
|
} else {
|
||||||
// This is a message outside the admin room
|
// This is a message outside the admin room
|
||||||
|
|
||||||
@@ -570,7 +571,7 @@ impl Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Looks good
|
// Looks good
|
||||||
return Some(InvocationSource::EscapedCommand);
|
Some(InvocationSource::EscapedCommand)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user