Skip to content

Commit

Permalink
fix(example): fix build example error
Browse files Browse the repository at this point in the history
    fix build example error(examples/resource-manager.rs)
  • Loading branch information
ZengGengSen committed Feb 2, 2024
1 parent c515249 commit 68ea4c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/resource-manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn main() -> Result<(), String> {
}

type TextureManager<'l, T> = ResourceManager<'l, String, Texture<'l>, TextureCreator<T>>;
type FontManager<'l> = ResourceManager<'l, FontDetails, Font<'l, 'static>, Sdl2TtfContext>;
type FontManager<'l> = ResourceManager<'l, FontDetails, Font<'l, 'static>, Sdl2TtfContext<'l>>;

// Generic struct to cache any resource loaded by a ResourceLoader
pub struct ResourceManager<'l, K, R, L>
Expand Down Expand Up @@ -134,7 +134,7 @@ impl<'l, T> ResourceLoader<'l, Texture<'l>> for TextureCreator<T> {
}

// Font Context knows how to load Fonts
impl<'l> ResourceLoader<'l, Font<'l, 'static>> for Sdl2TtfContext {
impl<'l> ResourceLoader<'l, Font<'l, 'static>> for Sdl2TtfContext<'l> {
type Args = FontDetails;
fn load(&'l self, details: &FontDetails) -> Result<Font<'l, 'static>, String> {
println!("LOADED A FONT");
Expand Down

0 comments on commit 68ea4c3

Please sign in to comment.