diff --git a/cursive-core/src/builder.rs b/cursive-core/src/builder.rs index 3e75aea7..9f658d79 100644 --- a/cursive-core/src/builder.rs +++ b/cursive-core/src/builder.rs @@ -1109,10 +1109,10 @@ impl Context { /// Store a new variable for resolution. /// /// Can be a callback, a usize, ... - pub fn store(&mut self, name: S, value: T) + pub fn store(&mut self, name: S, value: T) where S: Into, - T: Clone + Send + Sync, + T: Clone + Send + Sync + 'static, { self.store_with(name, move |_, _| Ok(value.clone())); } diff --git a/cursive-core/src/event.rs b/cursive-core/src/event.rs index 49a9ae10..b2316042 100644 --- a/cursive-core/src/event.rs +++ b/cursive-core/src/event.rs @@ -412,6 +412,7 @@ impl Key { /// One of the buttons present on the mouse #[derive(PartialEq, Eq, Clone, Copy, Hash, Debug)] +#[non_exhaustive] pub enum MouseButton { /// The left button, used for main actions. Left, @@ -425,7 +426,7 @@ pub enum MouseButton { /// Fifth button if the mouse supports it. Button5, - // TODO: handle more buttons? + // TODO: handle more buttons? Wheel left/right? #[doc(hidden)] Other, } diff --git a/cursive-core/src/menu.rs b/cursive-core/src/menu.rs index e5ed3767..8a2497cd 100644 --- a/cursive-core/src/menu.rs +++ b/cursive-core/src/menu.rs @@ -21,7 +21,7 @@ use crate::{ use enumset::EnumSet; use std::sync::Arc; -const PLAIN_1CHAR_SPAN: &'static [IndexedSpan