From e14efd60912fe38fc7a433eed03113688087e65e Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 8 Aug 2024 15:29:08 +0400 Subject: [PATCH] style: move `with_tls_versions` to top --- src/client/builder.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/client/builder.rs b/src/client/builder.rs index 9e1f144..bb5e3db 100644 --- a/src/client/builder.rs +++ b/src/client/builder.rs @@ -86,6 +86,16 @@ impl ClientBuilder { Client::from(tls_config) } + /// Limit the supported TLS versions list to the specified ones. + /// Default is [`rustls::DEFAULT_VERSIONS`]. + pub fn with_tls_versions( + mut self, + versions: &'static [&'static SupportedProtocolVersion], + ) -> Self { + self.tls_versions = Some(versions); + self + } + /// Include webpki trust anchors. /// Not recommended (useless) as most Gemini capsules use self-signed /// TLS certs and properly configured TOFU policy is enough. @@ -128,14 +138,4 @@ impl ClientBuilder { self.custom_verifier = Some(Arc::new(custom_verifier)); self } - - /// Limit the supported TLS versions list to the specified ones. - /// Default is [`rustls::DEFAULT_VERSIONS`]. - pub fn with_tls_versions( - mut self, - versions: &'static [&'static SupportedProtocolVersion], - ) -> Self { - self.tls_versions = Some(versions); - self - } }