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:
@@ -1,9 +1,7 @@
|
||||
use axum::{Router, extract::State, routing::on};
|
||||
use conduwuit_api::client::full_user_deactivate;
|
||||
use conduwuit_service::oauth::OAuthTicket;
|
||||
use futures::StreamExt;
|
||||
use ruma::{OwnedRoomId, OwnedUserId, UserId};
|
||||
use serde::Deserialize;
|
||||
use tower_sessions::Session;
|
||||
use validator::{Validate, ValidationError, ValidationErrors};
|
||||
|
||||
|
||||
@@ -11,9 +11,8 @@ use ruma::{
|
||||
OwnedUserId,
|
||||
api::client::uiaa::{EmailUserIdentifier, MatrixUserIdentifier, UserIdentifier},
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde::Deserialize;
|
||||
use tower_sessions::Session;
|
||||
use validator::Validate;
|
||||
|
||||
use crate::{
|
||||
WebError,
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
use axum::{
|
||||
Router,
|
||||
extract::State,
|
||||
response::{IntoResponse, Response},
|
||||
routing::get,
|
||||
};
|
||||
use axum::{Router, extract::State, response::Response, routing::get};
|
||||
use conduwuit_service::threepid::EmailRequirement;
|
||||
use futures::StreamExt;
|
||||
use ruma::{OwnedClientSecret, OwnedSessionId};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use askama::{Template, filters::HtmlSafe};
|
||||
use validator::{ValidationError, ValidationErrors};
|
||||
use validator::ValidationErrors;
|
||||
|
||||
/// A reusable form component with field validation.
|
||||
#[derive(Debug, Template)]
|
||||
|
||||
@@ -116,9 +116,11 @@ impl DeviceCard {
|
||||
let display_name = oauth_metadata
|
||||
.as_ref()
|
||||
.and_then(|metadata| metadata.client_name.clone())
|
||||
.or(device
|
||||
.as_ref()
|
||||
.and_then(|device| device.display_name.clone()));
|
||||
.or_else(|| {
|
||||
device
|
||||
.as_ref()
|
||||
.and_then(|device| device.display_name.clone())
|
||||
});
|
||||
|
||||
let avatar_src = oauth_metadata
|
||||
.as_ref()
|
||||
|
||||
@@ -35,7 +35,6 @@ macro_rules! template {
|
||||
) => {
|
||||
#[derive(Debug, askama::Template)]
|
||||
#[template(path = $path)]
|
||||
#[allow(clippy::useless_let_if_seq)]
|
||||
struct $name$(<$lifetime>)? {
|
||||
context: $crate::pages::TemplateContext,
|
||||
$($field_name: $field_type,)*
|
||||
|
||||
@@ -5,13 +5,12 @@ Reset your password
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block content -%}
|
||||
{% decl body_class -%}
|
||||
{% if let ResetPasswordRequestBody::Unavailable = body -%}
|
||||
{% let body_class = "panel middle" -%}
|
||||
{% else -%}
|
||||
{% let body_class = "panel" -%}
|
||||
{% endif -%}
|
||||
<div class="{{ body_class }}">
|
||||
{% match body %}
|
||||
{% when ResetPasswordRequestBody::Form(_) %}
|
||||
<div class="panel">
|
||||
{% when ResetPasswordRequestBody::Unavailable %}
|
||||
<div class="panel middle"/>
|
||||
{% endmatch %}
|
||||
<h1>Reset your password</h1>
|
||||
{% match body %}
|
||||
{% when ResetPasswordRequestBody::Form(form) %}
|
||||
|
||||
Reference in New Issue
Block a user