Skip to content

Commit 4f7656b

Browse files
committed
style(server): apply rustfmt to TLS routing change
1 parent 3251612 commit 4f7656b

File tree

1 file changed

+2
-6
lines changed
  • crates/openshell-server/src

1 file changed

+2
-6
lines changed

crates/openshell-server/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ use tracing::{debug, error, info};
3232

3333
pub use grpc::OpenShellService;
3434
pub use http::{health_router, http_router};
35-
pub use multiplex::{MultiplexService, MultiplexedService};
3635
pub use multiplex::ALPN_H2;
36+
pub use multiplex::{MultiplexService, MultiplexedService};
3737
use persistence::Store;
3838
use sandbox::{SandboxClient, spawn_sandbox_watcher, spawn_store_reconciler};
3939
use sandbox_index::SandboxIndex;
@@ -222,11 +222,7 @@ pub async fn run_server(config: Config, tracing_log_bus: TracingLogBus) -> Resul
222222
// `serve()`, which can misidentify h2 connections as
223223
// HTTP/1.1 when the first read returns a partial
224224
// preface.
225-
let alpn = tls_stream
226-
.get_ref()
227-
.1
228-
.alpn_protocol()
229-
.unwrap_or_default();
225+
let alpn = tls_stream.get_ref().1.alpn_protocol().unwrap_or_default();
230226
let result = if alpn == ALPN_H2 {
231227
debug!(client = %addr, "ALPN negotiated h2 — serving HTTP/2");
232228
service.serve_h2(tls_stream).await

0 commit comments

Comments
 (0)