mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Use already present lifetime
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ pub struct Timer<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Timer<'a> {
|
||||
pub fn new<'b>(delay: uint, callback: ||: 'b -> uint, remove_on_drop: bool) -> Timer<'b> {
|
||||
pub fn new(delay: uint, callback: ||: 'a -> uint, remove_on_drop: bool) -> Timer<'a> {
|
||||
unsafe {
|
||||
let c_param = mem::transmute::<_, raw::Closure>(callback);
|
||||
Timer { delay: delay, raw: 0, closure: c_param, remove_on_drop: remove_on_drop, lifetime: ContravariantLifetime }
|
||||
|
||||
Reference in New Issue
Block a user