@@ -343,9 +343,9 @@ pub fn dev() -> bool {
343343/// # Stability
344344/// This is the output of the [`generate_context`] macro, and is not considered part of the stable API.
345345/// Unless you know what you are doing and are prepared for this type to have breaking changes, do not create it yourself.
346- pub struct Context < A : Assets > {
346+ pub struct Context {
347347 pub ( crate ) config : Config ,
348- pub ( crate ) assets : Box < A > ,
348+ pub ( crate ) assets : Box < dyn Assets > ,
349349 pub ( crate ) default_window_icon : Option < image:: Image < ' static > > ,
350350 pub ( crate ) app_icon : Option < Vec < u8 > > ,
351351 #[ cfg( all( desktop, feature = "tray-icon" ) ) ]
@@ -356,7 +356,7 @@ pub struct Context<A: Assets> {
356356 pub ( crate ) runtime_authority : RuntimeAuthority ,
357357}
358358
359- impl < A : Assets > fmt:: Debug for Context < A > {
359+ impl fmt:: Debug for Context {
360360 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
361361 let mut d = f. debug_struct ( "Context" ) ;
362362 d. field ( "config" , & self . config )
@@ -372,7 +372,7 @@ impl<A: Assets> fmt::Debug for Context<A> {
372372 }
373373}
374374
375- impl < A : Assets > Context < A > {
375+ impl Context {
376376 /// The config the application was prepared with.
377377 #[ inline( always) ]
378378 pub fn config ( & self ) -> & Config {
@@ -387,13 +387,13 @@ impl<A: Assets> Context<A> {
387387
388388 /// The assets to be served directly by Tauri.
389389 #[ inline( always) ]
390- pub fn assets ( & self ) -> & A {
391- & self . assets
390+ pub fn assets ( & self ) -> & dyn Assets {
391+ self . assets . as_ref ( )
392392 }
393393
394394 /// A mutable reference to the assets to be served directly by Tauri.
395395 #[ inline( always) ]
396- pub fn assets_mut ( & mut self ) -> & mut A {
396+ pub fn assets_mut ( & mut self ) -> & mut Box < dyn Assets > {
397397 & mut self . assets
398398 }
399399
@@ -459,7 +459,7 @@ impl<A: Assets> Context<A> {
459459 #[ allow( clippy:: too_many_arguments) ]
460460 pub fn new (
461461 config : Config ,
462- assets : Box < A > ,
462+ assets : Box < dyn Assets > ,
463463 default_window_icon : Option < image:: Image < ' static > > ,
464464 app_icon : Option < Vec < u8 > > ,
465465 package_info : PackageInfo ,
0 commit comments