style(core): cargo fmt (B1/B3/B13 follow-up — satisfy release fmt gate)

This commit is contained in:
archipelago 2026-06-16 03:09:18 -04:00
parent 486f1a061c
commit 2943fd0c5e
3 changed files with 8 additions and 9 deletions

View File

@ -225,8 +225,7 @@ impl ApiHandler {
return bad("invalid onion or content id");
}
let fips_npub =
crate::federation::fips_npub_for_onion(&self.config.data_dir, onion).await;
let fips_npub = crate::federation::fips_npub_for_onion(&self.config.data_dir, onion).await;
let peer_path = format!("/content/{}", content_id);
let mut req = crate::fips::dial::PeerRequest::new(fips_npub.as_deref(), onion, &peer_path)
.service(crate::settings::transport::PeerService::PeerFiles)

View File

@ -36,8 +36,7 @@ const NGINX_ENABLED_CONF_PATH: &str = "/etc/nginx/sites-enabled/archipelago";
/// own `/app/fedimint/` location, so it needs the same B13 asset-rewrite heal as
/// the main conf — browsers reach fedimint over HTTPS via this snippet. Absent on
/// HTTP-only nodes, in which case the bootstrap loop skips it.
const NGINX_HTTPS_SNIPPET_PATH: &str =
"/etc/nginx/snippets/archipelago-https-app-proxies.conf";
const NGINX_HTTPS_SNIPPET_PATH: &str = "/etc/nginx/snippets/archipelago-https-app-proxies.conf";
const RUNTIME_ASSETS_DIR: &str = "/opt/archipelago/web-ui/archipelago-runtime";
/// Inserted into every server block of the nginx config that lacks the
@ -615,10 +614,7 @@ async fn patch_nginx_conf(path: &str) -> Result<bool> {
// so insert the reroot set after the unique :8175 proxy_pass. Guarded on
// the marker so it can never double-apply after Style A already healed.
if !patched.contains("'href=\"/' 'href=\"/app/fedimint/'") {
patched = patched.replace(
NGINX_FEDIMINT_SNIPPET_ANCHOR,
NGINX_FEDIMINT_SNIPPET_INSERT,
);
patched = patched.replace(NGINX_FEDIMINT_SNIPPET_ANCHOR, NGINX_FEDIMINT_SNIPPET_INSERT);
}
}

View File

@ -371,7 +371,11 @@ mod tests {
Some("npub1merged"),
"merges fips_npub from the dropped duplicate"
);
assert_eq!(kept.name.as_deref(), Some("Sapien"), "merges name from the dup");
assert_eq!(
kept.name.as_deref(),
Some("Sapien"),
"merges name from the dup"
);
}
#[test]