Skip to content

Commit 2e7cb63

Browse files
committed
gw: cargo fmt
1 parent e63b3f6 commit 2e7cb63

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

gateway/src/proxy/port_attrs.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ pub(crate) async fn should_send_pp(state: &Proxy, instance_id: &str, port: u16)
3939
async fn lazy_fetch(state: &Proxy, instance_id: &str) -> Result<BTreeMap<u16, PortFlags>> {
4040
let (ip, agent_port) = {
4141
let guard = state.lock();
42-
let ip = guard
43-
.instance_ip(instance_id)
44-
.context("unknown instance")?;
42+
let ip = guard.instance_ip(instance_id).context("unknown instance")?;
4543
(ip, guard.config.proxy.agent_port)
4644
};
4745

@@ -59,10 +57,7 @@ async fn lazy_fetch(state: &Proxy, instance_id: &str) -> Result<BTreeMap<u16, Po
5957
async fn fetch_port_attrs(ip: Ipv4Addr, agent_port: u16) -> Result<BTreeMap<u16, PortFlags>> {
6058
let url = format!("http://{ip}:{agent_port}/prpc");
6159
let client = DstackGuestClient::new(PrpcClient::new(url));
62-
let info = client
63-
.info()
64-
.await
65-
.context("agent Info() rpc failed")?;
60+
let info = client.info().await.context("agent Info() rpc failed")?;
6661
if info.tcb_info.is_empty() {
6762
// Legacy CVM with public_tcbinfo=false; we cannot inspect app-compose
6863
// remotely. Cache an empty map so we don't keep retrying.

gateway/src/proxy/tls_terminate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use hyper::server::conn::http1;
1313
use hyper::service::service_fn;
1414
use hyper::{Request, Response, StatusCode};
1515
use hyper_util::rt::tokio::TokioIo;
16-
use rustls::version::{TLS12, TLS13};
1716
use proxy_protocol::ProxyHeader;
17+
use rustls::version::{TLS12, TLS13};
1818
use serde::Serialize;
1919
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt as _, ReadBuf};
2020
use tokio::net::TcpStream;

0 commit comments

Comments
 (0)