diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs index b96ffac260..8189dd616c 100644 --- a/native/src/widget/pick_list.rs +++ b/native/src/widget/pick_list.rs @@ -224,7 +224,7 @@ where self.selected.as_ref(), &self.handle, &self.style, - || tree.state.downcast_ref::>(), + tree.state.downcast_ref::>(), ) } @@ -593,13 +593,12 @@ pub fn draw<'a, T, Renderer>( selected: Option<&T>, handle: &Handle, style: &::Style, - state: impl FnOnce() -> &'a State, + state: &State, ) where Renderer: text::Renderer, Renderer::Theme: StyleSheet, T: ToString + 'a, { - let state = state(); let bounds = layout.bounds(); let is_mouse_over = bounds.contains(cursor_position); let is_selected = selected.is_some();