fix: clippy issues

This commit is contained in:
2025-02-01 15:32:53 +07:00
parent 09a0d089bc
commit c982c802e2
10 changed files with 205 additions and 67 deletions

View File

@@ -19,11 +19,13 @@ pub trait ContextMenuExt: ParentElement + Sized {
impl<E> ContextMenuExt for Stateful<E> where E: ParentElement {}
impl<E> ContextMenuExt for FocusableWrapper<E> where E: ParentElement {}
type Menu =
Option<Box<dyn Fn(PopupMenu, &mut Window, &mut Context<PopupMenu>) -> PopupMenu + 'static>>;
/// A context menu that can be shown on right-click.
pub struct ContextMenu {
id: ElementId,
menu:
Option<Box<dyn Fn(PopupMenu, &mut Window, &mut Context<PopupMenu>) -> PopupMenu + 'static>>,
menu: Menu,
anchor: Corner,
}