@@ -153,13 +153,13 @@ impl From<Certificate> for Vec<rustls::pki_types::CertificateDer<'static>> {
153153 }
154154}
155155
156- #[ cfg( feature = "tls " ) ]
156+ #[ cfg( feature = "_tls " ) ]
157157impl fmt:: Debug for Certificate {
158158 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
159159 write ! ( f, "[Certificate]" )
160160 }
161161}
162- #[ cfg( feature = "tls " ) ]
162+ #[ cfg( feature = "_tls " ) ]
163163impl PartialEq for Certificate {
164164 fn eq ( & self , _other : & Self ) -> bool {
165165 true
@@ -280,15 +280,15 @@ pub struct Options {
280280 pub ( crate ) execute_timeout : Option < Duration > ,
281281
282282 /// Enable TLS encryption (defaults to `false`)
283- #[ cfg( feature = "tls " ) ]
283+ #[ cfg( feature = "_tls " ) ]
284284 pub ( crate ) secure : bool ,
285285
286286 /// Skip certificate verification (default is `false`).
287- #[ cfg( feature = "tls " ) ]
287+ #[ cfg( feature = "_tls " ) ]
288288 pub ( crate ) skip_verify : bool ,
289289
290290 /// An X509 certificate.
291- #[ cfg( feature = "tls " ) ]
291+ #[ cfg( feature = "_tls " ) ]
292292 pub ( crate ) certificate : Option < Certificate > ,
293293
294294 /// Query settings
@@ -339,11 +339,11 @@ impl Default for Options {
339339 query_timeout : Duration :: from_secs ( 180 ) ,
340340 insert_timeout : Some ( Duration :: from_secs ( 180 ) ) ,
341341 execute_timeout : Some ( Duration :: from_secs ( 180 ) ) ,
342- #[ cfg( feature = "tls " ) ]
342+ #[ cfg( feature = "_tls " ) ]
343343 secure : false ,
344- #[ cfg( feature = "tls " ) ]
344+ #[ cfg( feature = "_tls " ) ]
345345 skip_verify : false ,
346- #[ cfg( feature = "tls " ) ]
346+ #[ cfg( feature = "_tls " ) ]
347347 certificate : None ,
348348 settings : HashMap :: new ( ) ,
349349 alt_hosts : Vec :: new ( ) ,
@@ -481,19 +481,19 @@ impl Options {
481481 => execute_timeout: Option <Duration >
482482 }
483483
484- #[ cfg( feature = "tls " ) ]
484+ #[ cfg( feature = "_tls " ) ]
485485 property ! {
486486 /// Establish secure connection (default is `false`).
487487 => secure: bool
488488 }
489489
490- #[ cfg( feature = "tls " ) ]
490+ #[ cfg( feature = "_tls " ) ]
491491 property ! {
492492 /// Skip certificate verification (default is `false`).
493493 => skip_verify: bool
494494 }
495495
496- #[ cfg( feature = "tls " ) ]
496+ #[ cfg( feature = "_tls " ) ]
497497 property ! {
498498 /// An X509 certificate.
499499 => certificate: Option <Certificate >
@@ -586,9 +586,9 @@ where
586586 options. execute_timeout = parse_param ( key, value, parse_opt_duration) ?
587587 }
588588 "compression" => options. compression = parse_param ( key, value, parse_compression) ?,
589- #[ cfg( feature = "tls " ) ]
589+ #[ cfg( feature = "_tls " ) ]
590590 "secure" => options. secure = parse_param ( key, value, bool:: from_str) ?,
591- #[ cfg( feature = "tls " ) ]
591+ #[ cfg( feature = "_tls " ) ]
592592 "skip_verify" => options. skip_verify = parse_param ( key, value, bool:: from_str) ?,
593593 "alt_hosts" => options. alt_hosts = parse_param ( key, value, parse_hosts) ?,
594594 _ => {
@@ -727,7 +727,7 @@ mod test {
727727 }
728728
729729 #[ test]
730- #[ cfg( feature = "tls " ) ]
730+ #[ cfg( feature = "_tls " ) ]
731731 fn test_parse_secure_options ( ) {
732732 let url = "tcp://username:password@host1:9001/database?ping_timeout=42ms&keepalive=99s&compression=lz4&connection_timeout=10s&secure=true&skip_verify=true" ;
733733 assert_eq ! (
0 commit comments