diff --git a/.changes/native_icon.md b/.changes/native_icon.md new file mode 100644 index 0000000..c000e74 --- /dev/null +++ b/.changes/native_icon.md @@ -0,0 +1,5 @@ +--- +"muda": "patch" +--- + +Changed `IconMenuItem::set_native_icon` to take `&self` instead of `&mut self`. diff --git a/src/items/icon.rs b/src/items/icon.rs index 222b658..1e3a44b 100644 --- a/src/items/icon.rs +++ b/src/items/icon.rs @@ -176,7 +176,7 @@ impl IconMenuItem { /// ## Platform-specific: /// /// - **Windows / Linux**: Unsupported. - pub fn set_native_icon(&mut self, _icon: Option) { + pub fn set_native_icon(&self, _icon: Option) { #[cfg(target_os = "macos")] self.inner.borrow_mut().set_native_icon(_icon) } diff --git a/src/items/submenu.rs b/src/items/submenu.rs index eb997fa..9005671 100644 --- a/src/items/submenu.rs +++ b/src/items/submenu.rs @@ -132,7 +132,7 @@ impl Submenu { self.inner.borrow_mut().remove(item) } - /// Remove the menu item at the specified position from this submenu. + /// Remove the menu item at the specified position from this submenu and returns it. pub fn remove_at(&self, position: usize) -> Option { let mut items = self.items(); if items.len() > position { diff --git a/src/menu.rs b/src/menu.rs index bf84e1b..9458ab5 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -144,7 +144,7 @@ impl Menu { self.inner.borrow_mut().remove(item) } - /// Remove the menu item at the specified position from this menu. + /// Remove the menu item at the specified position from this menu and returns it. pub fn remove_at(&self, position: usize) -> Option { let mut items = self.items(); if items.len() > position {