use sdl2::render::TextureCreator;
use sdl2::video::WindowContext;
-pub struct SpriteManager<'canvas> {
- texture_creator: &'canvas TextureCreator<WindowContext>, // 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<WindowContext>, // 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<WindowContext>) -> SpriteManager<'canvas> {
+impl SpriteManager {
+ pub fn new(texture_creator: TextureCreator<WindowContext>) -> SpriteManager {
SpriteManager {
texture_creator,
textures: HashMap::new(),