From 2f300b9dfafaff612e4e60ba1b7038e4e5094933 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sun, 2 Oct 2022 21:24:11 +0900 Subject: [PATCH] add `#[non_exhaustive]` to `CursorMove` --- src/cursor.rs | 4 +++- src/input.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cursor.rs b/src/cursor.rs index 3399f7b..3f73026 100644 --- a/src/cursor.rs +++ b/src/cursor.rs @@ -4,7 +4,9 @@ use crate::word::{find_word_start_backward, find_word_start_forward}; use arbitrary::Arbitrary; use std::cmp; -/// Specify how to move the cursor. +/// Specify how to move the cursor. This type is marked as `#[non_exhaustive]` since more variations may be supported in the +/// future. +#[non_exhaustive] #[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))] pub enum CursorMove { diff --git a/src/input.rs b/src/input.rs index 154f492..e44fb00 100644 --- a/src/input.rs +++ b/src/input.rs @@ -8,7 +8,7 @@ use crossterm::event::{ #[cfg(feature = "termion")] use termion::event::{Event as TermionEvent, Key as TermionKey, MouseEvent as TermionMouseEvent}; -/// Backend-agnostic key input kind. +/// Backend-agnostic key input kind. This type is marked as `#[non_exhaustive]` since more keys may be supported in the future. #[non_exhaustive] #[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))]