File tree Expand file tree Collapse file tree 5 files changed +3
-7
lines changed Expand file tree Collapse file tree 5 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0"
66description = " A wrapper over a platform's native TLS implementation"
77repository = " https://github.com/sfackler/rust-native-tls"
88readme = " README.md"
9+ rust-version = " 1.53.0"
910
1011[package .metadata .docs .rs ]
1112features = [" alpn" ]
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ fn supported_protocols(
3232 Protocol :: Tlsv10 => SslVersion :: TLS1 ,
3333 Protocol :: Tlsv11 => SslVersion :: TLS1_1 ,
3434 Protocol :: Tlsv12 => SslVersion :: TLS1_2 ,
35- Protocol :: __NonExhaustive => unreachable ! ( ) ,
3635 }
3736 }
3837
@@ -71,7 +70,6 @@ fn supported_protocols(
7170 | SslOptions :: NO_TLSV1
7271 | SslOptions :: NO_TLSV1_1
7372 }
74- Some ( Protocol :: __NonExhaustive) => unreachable ! ( ) ,
7573 } ;
7674 options |= match max {
7775 None | Some ( Protocol :: Tlsv12 ) => SslOptions :: empty ( ) ,
@@ -80,7 +78,6 @@ fn supported_protocols(
8078 Some ( Protocol :: Sslv3 ) => {
8179 SslOptions :: NO_TLSV1 | SslOptions :: NO_TLSV1_1 | SslOptions :: NO_TLSV1_2
8280 }
83- Some ( Protocol :: __NonExhaustive) => unreachable ! ( ) ,
8481 } ;
8582
8683 ctx. set_options ( options) ;
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ fn convert_protocol(protocol: Protocol) -> SslProtocol {
4848 Protocol :: Tlsv10 => SslProtocol :: TLS1 ,
4949 Protocol :: Tlsv11 => SslProtocol :: TLS11 ,
5050 Protocol :: Tlsv12 => SslProtocol :: TLS12 ,
51- Protocol :: __NonExhaustive => unreachable ! ( ) ,
5251 }
5352}
5453
Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ impl<S> From<imp::HandshakeError<S>> for HandshakeError<S> {
311311
312312/// SSL/TLS protocol versions.
313313#[ derive( Debug , Copy , Clone ) ]
314+ #[ non_exhaustive]
314315pub enum Protocol {
315316 /// The SSL 3.0 protocol.
316317 ///
@@ -325,8 +326,6 @@ pub enum Protocol {
325326 Tlsv11 ,
326327 /// The TLS 1.2 protocol.
327328 Tlsv12 ,
328- #[ doc( hidden) ]
329- __NonExhaustive,
330329}
331330
332331/// A builder for `TlsConnector`s.
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ fn certificate_from_pem() {
141141 let keys = test_cert_gen:: keys ( ) ;
142142
143143 let der_path = dir. path ( ) . join ( "cert.der" ) ;
144- fs:: write ( & der_path, & keys. client . ca . get_der ( ) ) . unwrap ( ) ;
144+ fs:: write ( & der_path, keys. client . ca . get_der ( ) ) . unwrap ( ) ;
145145 let output = Command :: new ( "openssl" )
146146 . arg ( "x509" )
147147 . arg ( "-in" )
You can’t perform that action at this time.
0 commit comments