chore: cargo fmt with rustfmt 1.9.0 (repo-wide)

CI gates on cargo fmt --all -- --check and it was already failing on main before
this branch: rustfmt 1.9.0 reformats three call chains that an older rustfmt
left alone. Same housekeeping as 586d29e.
This commit is contained in:
jwinterm
2026-08-13 10:37:13 -04:00
parent 63fe704ef1
commit c2c07db34a
3 changed files with 18 additions and 4 deletions
+10 -2
View File
@@ -268,7 +268,11 @@ pub async fn activate(
// Just activated, so general posting is permitted regardless of policy; still
// report the allowlist bit truthfully.
let npub = state.db.get_user_by_id(user_id).await?.and_then(|u| u.nostr_pubkey);
let npub = state
.db
.get_user_by_id(user_id)
.await?
.and_then(|u| u.nostr_pubkey);
let (write_allowlisted, _) = general_posting_rights(&state, npub.as_deref());
Ok(Json(StatusResp {
active: true,
@@ -297,7 +301,11 @@ pub async fn status(
let user_id = extract_user_id_from_token(&state, &headers).await?;
let until = state.db.get_premium_until(user_id).await?;
let active = until.map(|u| u > chrono::Utc::now()).unwrap_or(false);
let npub = state.db.get_user_by_id(user_id).await?.and_then(|u| u.nostr_pubkey);
let npub = state
.db
.get_user_by_id(user_id)
.await?
.and_then(|u| u.nostr_pubkey);
let (write_allowlisted, can_general) = general_posting_rights(&state, npub.as_deref());
Ok(Json(StatusResp {
active,
+5 -1
View File
@@ -239,7 +239,11 @@ impl SessionManager {
Ok(TokenInfo {
user_id,
platform: data.claims.platform,
session_id: data.claims.sid.as_deref().and_then(|s| Uuid::parse_str(s).ok()),
session_id: data
.claims
.sid
.as_deref()
.and_then(|s| Uuid::parse_str(s).ok()),
})
}
+3 -1
View File
@@ -186,7 +186,9 @@ impl Database {
audit_days: u64,
batch: i64,
) -> Result<u64, AppError> {
let logins = self.cleanup_old_login_events(login_events_days, batch).await?;
let logins = self
.cleanup_old_login_events(login_events_days, batch)
.await?;
let audits = self.cleanup_old_audit_logs(audit_days, batch).await?;
let scrubbed = self.scrub_legacy_login_ip_hashes(batch).await?;
if scrubbed > 0 {