From 038294339d64ed25db5f47054097bfc235e12a85 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Wed, 20 Mar 2019 17:05:18 -0700 Subject: [PATCH] Fix clippy warning --- src/views/canvas.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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>, }