From 7774ea8cd241560c1dee64376c0f4a9eaed497f0 Mon Sep 17 00:00:00 2001 From: omjadas Date: Sun, 22 Sep 2024 16:17:53 +1000 Subject: [PATCH] fix: builder Error --- src/proxy/builder.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/proxy/builder.rs b/src/proxy/builder.rs index 8febe8f..77ca2bc 100644 --- a/src/proxy/builder.rs +++ b/src/proxy/builder.rs @@ -23,8 +23,12 @@ use tokio_tungstenite::Connector; #[derive(Debug, Error)] #[non_exhaustive] pub enum Error { + #[cfg(feature = "native-tls-client")] + #[cfg_attr(docsrs, doc(cfg(feature = "native-tls-client")))] #[error("{0}")] NativeTls(#[from] hyper_tls::native_tls::Error), + #[cfg(feature = "rustls-client")] + #[cfg_attr(docsrs, doc(cfg(feature = "rustls-client")))] #[error("{0}")] Rustls(#[from] tokio_rustls::rustls::Error), } @@ -59,7 +63,8 @@ pub enum Error { /// .with_addr(std::net::SocketAddr::from(([127, 0, 0, 1], 0))) /// .with_ca(ca) /// .with_rustls_client(aws_lc_rs::default_provider()) -/// .build(); +/// .build() +/// .expect("Failed to create proxy"); /// # } /// ``` #[derive(Clone, Debug, PartialEq, Eq, Hash)]