Skip to content

Commit e033938

Browse files
committed
Enable warnings for exhaustive types
1 parent 2e7938d commit e033938

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@
6161
//! in the browser.
6262
6363
#![cfg_attr(not(feature = "std"), no_std)]
64-
#![warn(missing_docs, clippy::use_self)]
64+
#![warn(
65+
missing_docs,
66+
clippy::exhaustive_enums,
67+
clippy::exhaustive_structs,
68+
clippy::use_self
69+
)]
6570
#![cfg_attr(rustls_pki_types_docsrs, feature(doc_cfg))]
6671

6772
#[cfg(feature = "alloc")]
@@ -501,6 +506,7 @@ impl fmt::Debug for PrivatePkcs8KeyDer<'_> {
501506
/// The most common way to get one of these is to call [`rustls_webpki::anchor_from_trusted_cert()`].
502507
///
503508
/// [`rustls_webpki::anchor_from_trusted_cert()`]: https://docs.rs/rustls-webpki/latest/webpki/fn.anchor_from_trusted_cert.html
509+
#[allow(clippy::exhaustive_structs)]
504510
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
505511
pub struct TrustAnchor<'a> {
506512
/// Value of the `subject` field of the trust anchor
@@ -929,6 +935,7 @@ pub trait SignatureVerificationAlgorithm: Send + Sync + fmt::Debug {
929935
}
930936

931937
/// A detail-less error when a signature is not valid.
938+
#[allow(clippy::exhaustive_structs)]
932939
#[derive(Debug, Copy, Clone)]
933940
pub struct InvalidSignature;
934941

src/server_name.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ impl fmt::Debug for DnsNameInner<'_> {
301301

302302
/// The provided input could not be parsed because
303303
/// it is not a syntactically-valid DNS Name.
304+
#[allow(clippy::exhaustive_structs)]
304305
#[derive(Debug)]
305306
pub struct InvalidDnsNameError;
306307

@@ -382,6 +383,7 @@ const fn validate(input: &[u8]) -> Result<(), InvalidDnsNameError> {
382383
/// Note: because we intend to replace this type with `core::net::IpAddr` as soon as it is
383384
/// stabilized, the identity of this type should not be considered semver-stable. However, the
384385
/// attached interfaces are stable; they form a subset of those provided by `core::net::IpAddr`.
386+
#[allow(clippy::exhaustive_enums)]
385387
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
386388
pub enum IpAddr {
387389
/// An Ipv4 address.

0 commit comments

Comments
 (0)