Skip to content

Commit 7b78366

Browse files
committed
fmt
1 parent 42ba19f commit 7b78366

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/client/http/connect/connector.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl ConnectorService {
269269
http.set_nodelay(true);
270270
}
271271

272-
let mut connector = self.build_tls_connector(http, req.ex_data())?;
272+
let mut connector = self.build_tls_connector(http, req.metadata())?;
273273
let io = connector.call(req).await?;
274274

275275
// If the connection is HTTPS, wrap the TLS stream in a TlsConn for unified handling.
@@ -327,7 +327,7 @@ impl ConnectorService {
327327

328328
// Create a TLS connector for the established connection.
329329
let mut connector =
330-
self.build_tls_connector(self.http.clone(), req.ex_data())?;
330+
self.build_tls_connector(self.http.clone(), req.metadata())?;
331331
let established_conn = EstablishedConn::new(req, conn);
332332
let io = connector.call(established_conn).await?;
333333

@@ -349,7 +349,7 @@ impl ConnectorService {
349349
trace!("tunneling HTTPS over HTTP proxy: {:?}", proxy_uri);
350350

351351
// Create a tunnel connector with the proxy URI and the HTTP connector.
352-
let mut connector = self.build_tls_connector(self.http.clone(), req.ex_data())?;
352+
let mut connector = self.build_tls_connector(self.http.clone(), req.metadata())?;
353353
let mut tunnel = proxy::tunnel::TunnelConnector::new(proxy_uri, connector.clone());
354354

355355
// If the proxy has basic authentication, add it to the tunnel.
@@ -391,8 +391,8 @@ impl ConnectorService {
391391
debug!("starting new connection: {:?}", req.uri());
392392

393393
let intercepted = req
394-
.ex_data()
395-
.proxy()
394+
.metadata()
395+
.proxy_matcher()
396396
.and_then(|prox| prox.intercept(req.uri()))
397397
.or_else(|| {
398398
self.config

src/core/client/service/meta.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl ConnectMeta {
4242
}
4343

4444
/// Return the negotiated [`AlpnProtocol`].
45-
pub(crate) fn alpn(&self) -> Option<AlpnProtocol> {
45+
pub(crate) fn alpn_protocol(&self) -> Option<AlpnProtocol> {
4646
match self
4747
.options
4848
.as_ref()
@@ -58,7 +58,7 @@ impl ConnectMeta {
5858

5959
/// Return a reference to the [`ProxyMacher`].
6060
#[inline]
61-
pub(crate) fn proxy(&self) -> Option<&ProxyMacher> {
61+
pub(crate) fn proxy_matcher(&self) -> Option<&ProxyMacher> {
6262
self.options
6363
.as_ref()
6464
.and_then(RequestOptions::proxy_matcher)

src/core/client/service/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl ConnectRequest {
7272

7373
/// Returns the [`ConnectMeta`] connection parameters (ALPN, proxy, TCP/TLS options).
7474
#[inline]
75-
pub(crate) fn ex_data(&self) -> &ConnectMeta {
75+
pub(crate) fn metadata(&self) -> &ConnectMeta {
7676
self.extra.as_ref().as_ref()
7777
}
7878

@@ -428,7 +428,7 @@ where
428428

429429
let h1_builder = self.h1_builder.clone();
430430
let h2_builder = self.h2_builder.clone();
431-
let ver = match req.ex_data().alpn() {
431+
let ver = match req.metadata().alpn_protocol() {
432432
Some(AlpnProtocol::HTTP2) => Ver::Http2,
433433
_ => self.config.ver,
434434
};

src/tls/conn/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl Inner {
226226
)?;
227227

228228
// Set ALPN protocols
229-
if let Some(alpn) = req.ex_data().alpn() {
229+
if let Some(alpn) = req.metadata().alpn_protocol() {
230230
cfg.set_alpn_protos(&alpn.encode())?;
231231
}
232232

0 commit comments

Comments
 (0)