Upgrade to most recent version of Rust. Still doesn't work.

This commit is contained in:
2015-11-16 10:44:01 +01:00
parent b91ae6cb29
commit 5d5a693508
8 changed files with 239 additions and 225 deletions

View File

@@ -4,8 +4,8 @@ use sdl2::rect::Rect;
pub struct Player {
pub x: f32,
pub y: f32,
pub w: i32,
pub h: i32,
pub w: u32,
pub h: u32,
pub dx: f32,
pub dy: f32,
pub gravity: f32,
@@ -37,6 +37,6 @@ impl Player {
}
pub fn to_rect(&self) -> Rect {
Rect::new(self.x as i32, self.y as i32, self.w, self.h)
Rect::new_unwrap(self.x as i32, self.y as i32, self.w, self.h)
}
}