Skip to content

Commit 8aa7a6a

Browse files
committed
Mark some of the enums as non-exhaustive
1 parent 11ed183 commit 8aa7a6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

imap-proto/src/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub enum AttrMacro {
99
}
1010

1111
#[derive(Debug, Eq, PartialEq)]
12+
#[non_exhaustive]
1213
pub enum Response<'a> {
1314
Capabilities(Vec<Capability<'a>>),
1415
Continue {
@@ -51,6 +52,7 @@ pub enum Status {
5152
}
5253

5354
#[derive(Debug, Eq, PartialEq)]
55+
#[non_exhaustive]
5456
pub enum ResponseCode<'a> {
5557
Alert,
5658
BadCharset(Option<Vec<&'a str>>),
@@ -67,6 +69,7 @@ pub enum ResponseCode<'a> {
6769
}
6870

6971
#[derive(Debug, Eq, PartialEq)]
72+
#[non_exhaustive]
7073
pub enum StatusAttribute {
7174
HighestModSeq(u64), // RFC 4551
7275
Messages(u32),
@@ -115,6 +118,7 @@ pub enum Capability<'a> {
115118
}
116119

117120
#[derive(Debug, Eq, PartialEq)]
121+
#[non_exhaustive]
118122
pub enum Attribute {
119123
Body,
120124
Envelope,
@@ -142,6 +146,7 @@ pub enum SectionPath {
142146

143147
#[allow(clippy::large_enum_variant)]
144148
#[derive(Debug, Eq, PartialEq)]
149+
#[non_exhaustive]
145150
pub enum AttributeValue<'a> {
146151
BodySection {
147152
section: Option<SectionPath>,

0 commit comments

Comments
 (0)