@@ -484,16 +484,17 @@ impl<R: Runtime> AppHandle<R> {
484484 /// Ok(())
485485 /// });
486486 /// ```
487+ #[ inline]
487488 pub fn plugin < P : Plugin < R > + ' static > ( & self , plugin : P ) -> crate :: Result < ( ) > {
488- self . plugin_dyn ( Box :: new ( plugin) )
489+ self . plugin_boxed ( Box :: new ( plugin) )
489490 }
490491
491492 /// Adds a Tauri application plugin.
492493 ///
493494 /// This method is similar to [`Self::plugin`],
494495 /// but accepts a boxed trait object instead of a generic type.
495496 #[ cfg_attr( feature = "tracing" , tracing:: instrument( name = "app::plugin::register" , skip( plugin) , fields( name = plugin. name( ) ) ) ) ]
496- pub fn plugin_dyn ( & self , mut plugin : Box < dyn Plugin < R > > ) -> crate :: Result < ( ) > {
497+ pub fn plugin_boxed ( & self , mut plugin : Box < dyn Plugin < R > > ) -> crate :: Result < ( ) > {
497498 let mut store = self . manager ( ) . plugins . lock ( ) . unwrap ( ) ;
498499 store. initialize ( & mut plugin, self , & self . config ( ) . plugins ) ?;
499500 store. register ( plugin) ;
@@ -1688,17 +1689,18 @@ tauri::Builder::default()
16881689 /// tauri::Builder::default()
16891690 /// .plugin(plugin::init());
16901691 /// ```
1692+ #[ inline]
16911693 #[ must_use]
16921694 pub fn plugin < P : Plugin < R > + ' static > ( self , plugin : P ) -> Self {
1693- self . plugin_dyn ( Box :: new ( plugin) )
1695+ self . plugin_boxed ( Box :: new ( plugin) )
16941696 }
16951697
16961698 /// Adds a Tauri application plugin.
16971699 ///
16981700 /// This method is similar to [`Self::plugin`],
16991701 /// but accepts a boxed trait object instead of a generic type.
17001702 #[ must_use]
1701- pub fn plugin_dyn ( mut self , plugin : Box < dyn Plugin < R > > ) -> Self {
1703+ pub fn plugin_boxed ( mut self , plugin : Box < dyn Plugin < R > > ) -> Self {
17021704 self . plugins . register ( plugin) ;
17031705 self
17041706 }
0 commit comments