@@ -22,21 +22,15 @@ use bitcoin::{Script, Txid};
2222#[ cfg( feature = "use-openssl" ) ]
2323use openssl:: ssl:: { SslConnector , SslMethod , SslStream , SslVerifyMode } ;
2424
25- #[ cfg( all(
26- any(
27- feature = "default" ,
28- feature = "use-rustls" ,
29- feature = "use-rustls-ring"
30- ) ,
31- not( feature = "use-openssl" )
32- ) ) ]
25+ #[ cfg( any( feature = "use-rustls" , feature = "use-rustls-ring" ) ) ]
26+ #[ allow( unused_imports) ]
3327use rustls:: {
3428 pki_types:: ServerName ,
3529 pki_types:: { Der , TrustAnchor } ,
3630 ClientConfig , ClientConnection , RootCertStore , StreamOwned ,
3731} ;
3832
39- #[ cfg( any ( feature = "default" , feature = " proxy") ) ]
33+ #[ cfg( feature = "proxy" ) ]
4034use crate :: socks:: { Socks5Stream , TargetAddr , ToTargetAddr } ;
4135
4236use crate :: stream:: ClonableStream ;
@@ -93,7 +87,7 @@ impl ToSocketAddrsDomain for (&str, u16) {
9387 }
9488}
9589
96- #[ cfg( any ( feature = "default" , feature = " proxy") ) ]
90+ #[ cfg( feature = "proxy" ) ]
9791impl ToSocketAddrsDomain for TargetAddr {
9892 fn domain ( & self ) -> Option < & str > {
9993 match self {
@@ -289,14 +283,8 @@ impl RawClient<ElectrumSslStream> {
289283 }
290284}
291285
292- #[ cfg( all(
293- any(
294- feature = "default" ,
295- feature = "use-rustls" ,
296- feature = "use-rustls-ring"
297- ) ,
298- not( feature = "use-openssl" )
299- ) ) ]
286+ #[ cfg( any( feature = "use-rustls" , feature = "use-rustls-ring" ) ) ]
287+ #[ allow( unused) ]
300288mod danger {
301289 use crate :: raw_client:: ServerName ;
302290 use rustls:: client:: danger:: { HandshakeSignatureValid , ServerCertVerified } ;
@@ -350,21 +338,13 @@ mod danger {
350338}
351339
352340#[ cfg( all(
353- any(
354- feature = "default" ,
355- feature = "use-rustls" ,
356- feature = "use-rustls-ring"
357- ) ,
341+ any( feature = "use-rustls" , feature = "use-rustls-ring" ) ,
358342 not( feature = "use-openssl" )
359343) ) ]
360344/// Transport type used to establish a Rustls TLS encrypted/authenticated connection with the server
361345pub type ElectrumSslStream = StreamOwned < ClientConnection , TcpStream > ;
362346#[ cfg( all(
363- any(
364- feature = "default" ,
365- feature = "use-rustls" ,
366- feature = "use-rustls-ring"
367- ) ,
347+ any( feature = "use-rustls" , feature = "use-rustls-ring" ) ,
368348 not( feature = "use-openssl" )
369349) ) ]
370350impl RawClient < ElectrumSslStream > {
0 commit comments