diff --git a/.changes/native_icon.md b/.changes/native_icon.md new file mode 100644 index 00000000..c000e744 --- /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 222b658c..1e3a44b1 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 eb997faa..90056710 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 bf84e1bd..9458ab57 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 {