Simplify Hotkey conversion in conversion::menu
This commit is contained in:
parent
b57d567981
commit
b3ff522c18
1 changed files with 1 additions and 6 deletions
|
|
@ -185,12 +185,7 @@ pub fn menu<Message>(menu: Menu<Message>) -> winit::window::Menu {
|
|||
menu::Entry::Item {
|
||||
content, hotkey, ..
|
||||
} => {
|
||||
let hotkey: Option<&keyboard::Hotkey> = hotkey.as_ref().into();
|
||||
converted.add_item(
|
||||
0,
|
||||
content,
|
||||
hotkey.map(|h| self::hotkey(*h)),
|
||||
);
|
||||
converted.add_item(0, content, hotkey.map(self::hotkey));
|
||||
}
|
||||
menu::Entry::Dropdown { content, submenu } => {
|
||||
converted.add_dropdown(content, self::menu(submenu));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue