@@ -15,10 +15,7 @@ use http::{HeaderMap, Response as HttpResponse};
1515use itertools:: Itertools ;
1616use log:: { debug, error, info} ;
1717use reqwest:: blocking:: Client ;
18- #[ cfg( any( feature = "client_der" , feature = "client_pem" ) ) ]
19- use reqwest:: Certificate ;
20- use reqwest:: Client as AsyncClient ;
21-
18+ use reqwest:: { Certificate , Client as AsyncClient } ;
2219use serde:: de:: DeserializeOwned ;
2320use serde:: Deserialize ;
2421use thiserror:: Error ;
@@ -30,7 +27,6 @@ use reqwest::Identity as TlsIdentity;
3027use crate :: api;
3128use crate :: auth:: { Auth , AuthError } ;
3229
33- #[ cfg( any( feature = "client_der" , feature = "client_pem" ) ) ]
3430#[ derive( Debug , Clone ) ]
3531pub enum RootCertificate {
3632 Der ( Vec < u8 > ) ,
@@ -147,7 +143,6 @@ enum CertPolicy {
147143 /// Trust all certificates (including expired certificates). This introduces significant
148144 /// vulnerabilities, and should only be used as a last resort.
149145 Insecure ,
150- #[ cfg( any( feature = "client_der" , feature = "client_pem" ) ) ]
151146 /// Trust certificates signed by the root certificate.
152147 SelfSigned ( RootCertificate ) ,
153148}
@@ -189,7 +184,6 @@ impl Gitlab {
189184 )
190185 }
191186
192- #[ cfg( any( feature = "client_der" , feature = "client_pem" ) ) ]
193187 /// Create a new Gitlab API representation, with a custom root certificate.
194188 ///
195189 /// The `token` should be a valid [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html).
@@ -316,7 +310,6 @@ impl Gitlab {
316310 } ,
317311 }
318312 } ,
319- #[ cfg( any( feature = "client_der" , feature = "client_pem" ) ) ]
320313 CertPolicy :: SelfSigned ( cert) => {
321314 let mut builder = Client :: builder ( ) ;
322315 match cert {
@@ -647,7 +640,6 @@ impl AsyncGitlab {
647640 } ,
648641 }
649642 } ,
650- #[ cfg( any( feature = "client_der" , feature = "client_pem" ) ) ]
651643 CertPolicy :: SelfSigned ( cert) => {
652644 let mut builder = AsyncClient :: builder ( ) ;
653645 match cert {
0 commit comments