File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ impl<R: Runtime> CheckMenuItem<R> {
8282
8383 /// Returns a unique identifier associated with this menu item.
8484 pub fn id ( & self ) -> & MenuId {
85- & self . 0 . id
85+ self . 0 . inner . id ( )
8686 }
8787
8888 /// Get the text for this menu item.
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl<R: Runtime> IconMenuItem<R> {
161161
162162 /// Returns a unique identifier associated with this menu item.
163163 pub fn id ( & self ) -> & MenuId {
164- & self . 0 . id
164+ self . 0 . inner . id ( )
165165 }
166166
167167 /// Get the text for this menu item.
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ impl<R: Runtime> Menu<R> {
251251
252252 /// Returns a unique identifier associated with this menu.
253253 pub fn id ( & self ) -> & MenuId {
254- & self . 0 . id
254+ self . 0 . inner . id ( )
255255 }
256256
257257 /// Add a menu item to the end of this menu.
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ macro_rules! gen_wrappers {
7070 $(
7171 #[ tauri_macros:: default_runtime( crate :: Wry , wry) ]
7272 pub ( crate ) struct $inner<R : $crate:: Runtime > {
73- id: $crate:: menu:: MenuId ,
7473 // SAFETY: we only call `ManuallyDrop::take` in [`Self::drop`] to drop it on main thread
7574 inner: ManuallyDrop <:: muda:: $type>,
7675 app_handle: $crate:: AppHandle <R >,
@@ -79,7 +78,6 @@ macro_rules! gen_wrappers {
7978 impl <R : $crate:: Runtime > $inner<R > {
8079 fn new( app_handle: $crate:: AppHandle <R >, menu: :: muda:: $type) -> Self {
8180 Self {
82- id: menu. id( ) . clone( ) ,
8381 inner: ManuallyDrop :: new( menu) ,
8482 app_handle,
8583 }
@@ -133,7 +131,7 @@ macro_rules! gen_wrappers {
133131 }
134132
135133 fn id( & self ) -> & MenuId {
136- & self . 0 . id
134+ self . 0 . inner . id ( )
137135 }
138136 }
139137 ) *
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl<R: Runtime> MenuItem<R> {
8080
8181 /// Returns a unique identifier associated with this menu item.
8282 pub fn id ( & self ) -> & MenuId {
83- & self . 0 . id
83+ self . 0 . inner . id ( )
8484 }
8585
8686 /// Get the text for this menu item.
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ impl<R: Runtime> PredefinedMenuItem<R> {
337337
338338 /// Returns a unique identifier associated with this menu item.
339339 pub fn id ( & self ) -> & MenuId {
340- & self . 0 . id
340+ self . 0 . inner . id ( )
341341 }
342342
343343 /// Get the text for this menu item.
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ impl<R: Runtime> Submenu<R> {
246246
247247 /// Returns a unique identifier associated with this submenu.
248248 pub fn id ( & self ) -> & MenuId {
249- & self . 0 . id
249+ self . 0 . inner . id ( )
250250 }
251251
252252 /// Add a menu item to the end of this submenu.
You can’t perform that action at this time.
0 commit comments