Skip to content

Commit a30fedc

Browse files
committed
fix clippy
1 parent 2f67071 commit a30fedc

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0"
66
description = "A wrapper over a platform's native TLS implementation"
77
repository = "https://github.com/sfackler/rust-native-tls"
88
readme = "README.md"
9+
rust-version = "1.53.0"
910

1011
[package.metadata.docs.rs]
1112
features = ["alpn"]

src/imp/openssl.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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);

src/imp/security_framework.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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]
314315
pub 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.

src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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")

0 commit comments

Comments
 (0)