Skip to content

Commit 78a652f

Browse files
steebchenclaude
andcommitted
chore: fix formatting with nightly rustfmt
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 72f1276 commit 78a652f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

crates/server/src/proxy.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ impl<P: Provider + Sync + Send + Debug + 'static> Proxy<P> {
196196

197197
// Get hostname if the flag is enabled
198198
let hostname = if hostname_header_enabled {
199-
hostname::get()
200-
.ok()
201-
.and_then(|h| h.into_string().ok())
199+
hostname::get().ok().and_then(|h| h.into_string().ok())
202200
} else {
203201
None
204202
};
@@ -395,7 +393,14 @@ impl<P: Provider + Sync + Send + Debug + 'static> Proxy<P> {
395393
let hostname = hostname.clone();
396394
async move {
397395
let handlers = handlers.read().await;
398-
handle(remote_addr, req, &handlers, &version_spec, hostname.as_deref()).await
396+
handle(
397+
remote_addr,
398+
req,
399+
&handlers,
400+
&version_spec,
401+
hostname.as_deref(),
402+
)
403+
.await
399404
}
400405
});
401406

@@ -449,9 +454,9 @@ async fn handle(
449454
if let Some(hostname_value) = hostname {
450455
response.headers_mut().insert(
451456
HeaderName::from_static("x-torii-host"),
452-
hostname_value.parse().unwrap_or_else(|_| {
453-
http::HeaderValue::from_static("unknown")
454-
}),
457+
hostname_value
458+
.parse()
459+
.unwrap_or_else(|_| http::HeaderValue::from_static("unknown")),
455460
);
456461
}
457462

0 commit comments

Comments
 (0)