X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fsprites.rs;h=57fc0a4eb4b0a05009ebc420fc3033b976cd686d;hb=fcbc5786908a32f68597961203d8c30e8a70c9ba;hp=82dd6dc193f5564774c22c8a1caf30ab259f7849;hpb=d0c9b1f58edc19fcfc8aa484fdb3b13940196a02;p=kaka%2Frust-sdl-test.git diff --git a/src/sprites.rs b/src/sprites.rs index 82dd6dc..57fc0a4 100644 --- a/src/sprites.rs +++ b/src/sprites.rs @@ -5,13 +5,13 @@ use sdl2::render::Texture; use sdl2::render::TextureCreator; use sdl2::video::WindowContext; -pub struct SpriteManager<'canvas> { - texture_creator: &'canvas TextureCreator, // can't make the lifetimes work when this is owned instead of borrowed - textures: HashMap<&'static str, Texture<'canvas>>, +pub struct SpriteManager { + texture_creator: TextureCreator, // can't make the lifetimes work when this is owned instead of borrowed + textures: HashMap<&'static str, Texture>, } -impl<'canvas> SpriteManager<'canvas> { - pub fn new(texture_creator: &'canvas TextureCreator) -> SpriteManager<'canvas> { +impl SpriteManager { + pub fn new(texture_creator: TextureCreator) -> SpriteManager { SpriteManager { texture_creator, textures: HashMap::new(),