Reverted exhaustive attribute change.

This commit is contained in:
Timon Post 2020-01-11 18:16:45 +01:00
parent f8f76dc2e1
commit 391b1886a7
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,6 @@ use crate::impl_from;
pub type Result<T> = std::result::Result<T, ErrorKind>; pub type Result<T> = std::result::Result<T, ErrorKind>;
/// Wrapper for all errors that can occur in `crossterm`. /// Wrapper for all errors that can occur in `crossterm`.
#[non_exhaustive]
#[derive(Debug)] #[derive(Debug)]
pub enum ErrorKind { pub enum ErrorKind {
IoError(io::Error), IoError(io::Error),
@ -19,6 +18,8 @@ pub enum ErrorKind {
Utf8Error(std::string::FromUtf8Error), Utf8Error(std::string::FromUtf8Error),
ParseIntError(std::num::ParseIntError), ParseIntError(std::num::ParseIntError),
ResizingTerminalFailure(String), ResizingTerminalFailure(String),
#[doc(hidden)]
__Nonexhaustive,
} }
impl std::error::Error for ErrorKind { impl std::error::Error for ErrorKind {

View File

@ -56,7 +56,6 @@ use super::super::SetAttribute;
/// println!("{}", "Negative text".negative()); /// println!("{}", "Negative text".negative());
/// ``` /// ```
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[non_exhaustive]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd, Hash)] #[derive(Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd, Hash)]
pub enum Attribute { pub enum Attribute {
/// Resets all the attributes. /// Resets all the attributes.
@ -109,6 +108,8 @@ pub enum Attribute {
NotFramedOrEncircled = 54, NotFramedOrEncircled = 54,
/// Turns off the `OverLined` attribute. /// Turns off the `OverLined` attribute.
NotOverLined = 55, NotOverLined = 55,
#[doc(hidden)]
__Nonexhaustive,
} }
impl Display for Attribute { impl Display for Attribute {