diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-01-07 11:34:56 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-01-07 11:54:42 +0100 |
commit | 29ffe45d89290b7685cb50d15e40b5a30658ec13 (patch) | |
tree | a88ea53ec66a8fddd773356f4ebe415eaf03f8ec /openpgp/src/message | |
parent | 15c26e549b53b2f94ad2d90e19bfa62c427ebed8 (diff) |
openpgp: Mark enum message::Token non-exhaustive.
- See #405.
Diffstat (limited to 'openpgp/src/message')
-rw-r--r-- | openpgp/src/message/lexer.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/message/lexer.rs b/openpgp/src/message/lexer.rs index 44483ccc..1bdc6c1f 100644 --- a/openpgp/src/message/lexer.rs +++ b/openpgp/src/message/lexer.rs @@ -8,6 +8,9 @@ pub(crate) type LexerItem<Tok, Loc, Error> = ::std::result::Result<(Loc, Tok, Loc), Error>; /// The components of an OpenPGP Message. +/// +/// Note: This enum cannot be exhaustively matched to allow future +/// extensions. #[derive(Debug, Clone, Copy, PartialEq)] pub enum Token { /// A Literal data packet. @@ -37,6 +40,10 @@ pub enum Token { /// A container's unparsed content. OpaqueContent, + + /// This marks this enum as non-exhaustive. Do not use this + /// variant. + #[doc(hidden)] __Nonexhaustive, } impl fmt::Display for Token { |