chore: Reformat with latest nightly

This commit is contained in:
Ginger committed 2026-09-01 12:55:05 -04:00
1 parent 03d669594e
commit 9fbabe2210
113 files changed
+981 -831

No files matched your search

+2 -2
View File
@@ -120,8 +120,8 @@ async fn route_change_email(
{
| Ok(session_id) => session_id,
| Err(err) => {
// If we couldn't send an email, generate a random session ID to not give that
// away
// If we couldn't send an email, generate a random session ID to
// not give that away
warn!(
"Failed to send email change message for {user_id} to {}: {err}",
form.email
+2 -1
View File
@@ -130,7 +130,8 @@ async fn route_login(
if let Some(form) = form {
let login_result = match (user_id, form.identifier) {
| (Some(user_id), _) => {
// The user is already authenticated, we need to check their password
// The user is already authenticated, we need to check their
// password
services
.users
.check_password(&user_id, &form.password)
+2 -2
View File
@@ -117,8 +117,8 @@ async fn route_reset_password(
}
.await
.unwrap_or_else(|| {
// If we couldn't send an email, generate a random session ID to not give that
// away
// If we couldn't send an email, generate a random session ID to not
// give that away
ValidationSessions::generate_session_id()
});
+7 -5
View File
@@ -186,8 +186,8 @@ async fn route_register(
if let Some(username) = &query.username
&& query.from_landing
{
// Check if the username is valid and available before showing the details form
// to keep the user from wasting their time
// Check if the username is valid and available before showing the
// details form to keep the user from wasting their time
if let Err(err) = services
.users
@@ -382,10 +382,12 @@ async fn begin_registration(
registration_token = Some(valid_token);
},
| RequestedRegistrationFlow::Untrusted => {
// Don't check auth for the untrusted flow at all if open reg is enabled
// Don't check auth for the untrusted flow at all if open reg is
// enabled
if !open_registration {
// If the form claims to be using the untrusted flow, it _may_ need to have a
// reCAPTCHA response if reCAPTCHA is configured
// If the form claims to be using the untrusted flow, it _may_
// need to have a reCAPTCHA response if reCAPTCHA is
// configured
if let Some(recaptcha_private_site_key) =
&services.config.recaptcha_private_site_key
+3 -3
View File
@@ -99,9 +99,9 @@ impl UserSession {
if let Ok(duration) = now.duration_since(self.last_login) {
duration < Self::RECENT_LOGIN_THRESHOLD
} else {
// Clock drift might cause the last login time to be later than the current
// system time. We play it safe and say the session isn't recent if that
// happens.
// Clock drift might cause the last login time to be later than the
// current system time. We play it safe and say the session isn't
// recent if that happens.
false
}
}