diff --git a/src/views/canvas.rs b/src/views/canvas.rs index c9ffa66..f7ded06 100644 --- a/src/views/canvas.rs +++ b/src/views/canvas.rs @@ -6,6 +6,9 @@ use crate::view::{Selector, View}; use crate::Printer; use crate::With; +// Define this type separately to appease the Clippy god +type CallOnAny = Box FnMut(&mut T, &Selector, AnyCb<'a>)>; + /// A blank view that forwards calls to closures. /// /// You can use this view to easily draw your own interface. @@ -19,7 +22,7 @@ pub struct Canvas { take_focus: Box bool>, needs_relayout: Box bool>, focus_view: Box Result<(), ()>>, - call_on_any: Box FnMut(&mut T, &Selector, AnyCb<'a>)>, + call_on_any: CallOnAny, important_area: Box Rect>, }