chore: Clippy fixes

This commit is contained in:
Ginger
2026-04-27 16:52:12 -04:00
parent 6b0b8344d4
commit f269fb5cfc
10 changed files with 21 additions and 26 deletions
+2 -1
View File
@@ -7,7 +7,7 @@ use std::{
use base64::Engine;
use conduwuit::{Result, utils::hash::sha256};
use database::{Deserialized, Json, Map};
use ruma::{DeviceId, OwnedUserId, UserId};
use ruma::DeviceId;
use crate::{Dep, config, oauth::client_metadata::ClientMetadata};
@@ -36,6 +36,7 @@ pub enum OAuthTicket {
impl OAuthTicket {
const MAX_AGE: Duration = Duration::from_mins(10);
#[must_use]
pub fn ticket_issue_path(&self) -> &'static str {
match self {
| Self::CrossSigningReset => "/account/cross_signing_reset",
+4 -2
View File
@@ -83,8 +83,8 @@ enum UiaaSessionMetadata {
impl UiaaSessionMetadata {
fn into_identity(self) -> Identity {
match self {
| UiaaSessionMetadata::Legacy { identity } => identity,
| UiaaSessionMetadata::OAuth { localpart, .. } =>
| Self::Legacy { identity } => identity,
| Self::OAuth { localpart, .. } =>
assign!(Identity::default(), { localpart: Some(localpart) }),
}
}
@@ -98,10 +98,12 @@ pub struct UiaaInitiator<'a> {
}
impl<'a> UiaaInitiator<'a> {
#[must_use]
pub fn new(user_id: &'a UserId, device_id: Option<&'a DeviceId>) -> Self {
Self { user_id, device_id, oauth_ticket: None }
}
#[must_use]
pub fn with_oauth_ticket(
user_id: &'a UserId,
device_id: Option<&'a DeviceId>,