diff --git a/Cargo.toml b/Cargo.toml index bd1dbdea..1ddf911d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "sdl2_ttf" description = "SDL2_ttf bindings for Rust" repository = "https://github.com/andelf/rust-sdl2_ttf" -version = "0.25.0" +version = "0.25.1" license = "MIT" readme = "README.md" authors = ["ShuYu Wang "] diff --git a/src/sdl2_ttf/context.rs b/src/sdl2_ttf/context.rs index e67a3021..7223c7ae 100644 --- a/src/sdl2_ttf/context.rs +++ b/src/sdl2_ttf/context.rs @@ -42,8 +42,8 @@ impl Sdl2TtfContext { /// Loads a font from the given SDL2 rwops object with the given size in /// points. - pub fn load_font_from_rwops<'a>(&'a self, rwops: RWops<'a>, point_size: u16) - -> Result, String> { + pub fn load_font_from_rwops<'a,'b>(&'a self, rwops: RWops<'b>, point_size: u16) + -> Result, String> { let raw = unsafe { ffi::TTF_OpenFontRW(rwops.raw(), 0, point_size as c_int) }; @@ -56,8 +56,8 @@ impl Sdl2TtfContext { /// Loads the font at the given index of the SDL2 rwops object with /// the given size in points. - pub fn load_font_at_index_from_rwops<'a>(&'a self, rwops: RWops<'a>, index: u32, - point_size: u16) -> Result { + pub fn load_font_at_index_from_rwops<'a,'b>(&'a self, rwops: RWops<'b>, index: u32, + point_size: u16) -> Result, String> { let raw = unsafe { ffi::TTF_OpenFontIndexRW(rwops.raw(), 0, point_size as c_int, index as c_long)