Take rustfmt's defaults

The code was hand-formatted -- close to rustfmt's output but not it, mostly
in keeping chains and call arguments on one line where the formatter would
break them. That is a per-line decision every future change has to make
again, and reproducing it would mean a config whose only job is to preserve
how the code already looks.

So this is `cargo fmt` at its defaults, with no rustfmt.toml, which is
where the sibling dev-updater checkout already sits: it is clean at the
defaults today, so the two repos now agree on layout without either of them
configuring it.

Formatting only -- no behaviour, no renames, nothing reordered. Verified
after: cargo test (35 pass), cargo clippy --all-targets clean, cargo fmt
--check clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xn8nHw1tw1R6PtiY1eEtw
This commit is contained in:
irisandClaude Opus 5 committed 2026-08-28 03:13:36 -04:00
1 parent f014094fcd
commit c12ab7f098
13 files changed
+557 -190

No files matched your search

+11 -5
View File
@@ -72,8 +72,11 @@ pub async fn require_token(
.and_then(|value| value.to_str().ok())
.and_then(|value| value.strip_prefix("Bearer "));
if let Some(token) = presented {
let hashes: Vec<String> =
manager.tokens().into_iter().map(|entry| entry.sha256).collect();
let hashes: Vec<String> = manager
.tokens()
.into_iter()
.map(|entry| entry.sha256)
.collect();
if token_matches(token, &hashes) {
return next.run(request).await;
}
@@ -105,8 +108,7 @@ mod tests {
fn manager_with_token(dir: &std::path::Path, token: &str) -> Arc<SessionManager> {
let manager = Arc::new(
SessionManager::new(dir.join("config.ron"), dir.join("sessions"))
.expect("manager"),
SessionManager::new(dir.join("config.ron"), dir.join("sessions")).expect("manager"),
);
manager
.set_tokens(vec![TokenEntry {
@@ -195,7 +197,11 @@ mod tests {
.oneshot(request(path, auth.as_deref()))
.await
.expect("response");
assert_eq!(response.status(), StatusCode::UNAUTHORIZED, "{path} {auth:?}");
assert_eq!(
response.status(),
StatusCode::UNAUTHORIZED,
"{path} {auth:?}"
);
}
let ok = router