diff --git a/src/error.rs b/src/error.rs index f7c1abd2d8a95186b89e2f04df97f7935b25a1c0..c49595b6c4c0e88c0d8420e39c01744d38c942f7 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,6 +10,7 @@ use std::str; /// The error type for Rustyline errors that can arise from /// I/O related errors or Errno when using the nix-rust library +/// #[non_exhaustive] #[derive(Debug)] pub enum ReadlineError { /// I/O Error diff --git a/src/keymap.rs b/src/keymap.rs index b9c4a7ad4789dd16e6d1a40f316ab9278a5ac8fb..9841f783af18c7ae9d0ffcc202f9217afb59926a 100644 --- a/src/keymap.rs +++ b/src/keymap.rs @@ -12,6 +12,7 @@ use tty::RawReader; pub type RepeatCount = usize; /// Commands +/// #[non_exhaustive] #[derive(Debug, Clone, PartialEq)] pub enum Cmd { /// abort diff --git a/src/keys.rs b/src/keys.rs index 0cd5e1e384f609e89c22b383f35bf862ff6335f9..ecffecd4900a8728d9d7bca7be351cd0abd92aff 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -1,5 +1,6 @@ //! Key constants +/// #[non_exhaustive] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum KeyPress { UnknownEscSeq, diff --git a/src/lib.rs b/src/lib.rs index 1452f94d665af1c183157de83c92d642be365911..8bd54832effeea1a6ece861e5e570abb5cf35a0d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,8 @@ //! } //! ``` #![allow(unknown_lints)] -// #![feature(tool_lints)] unstable feature +// #![feature(non_exhaustive)] +// #![feature(tool_lints)] extern crate dirs; extern crate libc;