Update MSRV to 1.84.0

And appease clippy (`__CARGO_FIX_YOLO=1 cargo clippy --fix` plus some
manual type shuffling).
This commit is contained in:
Lambda 2025-02-02 11:30:07 +00:00
parent 5616510727
commit 175a62007d
20 changed files with 83 additions and 89 deletions

View file

@ -443,8 +443,8 @@ impl Service {
&self.config.turn.secret
}
pub(crate) fn emergency_password(&self) -> &Option<String> {
&self.config.emergency_password
pub(crate) fn emergency_password(&self) -> Option<&str> {
self.config.emergency_password.as_deref()
}
/// If the emergency password option is set, attempts to set the emergency
@ -455,10 +455,9 @@ impl Service {
let inner = || -> Result<bool> {
let admin_bot = self.admin_bot_user_id.as_ref();
services().users.set_password(
admin_bot,
self.emergency_password().as_deref(),
)?;
services()
.users
.set_password(admin_bot, self.emergency_password())?;
let (ruleset, res) = match self.emergency_password() {
Some(_) => (Ruleset::server_default(admin_bot), Ok(true)),