Skip to content

Commit

Permalink
Rust stable support. Removed nll requirement.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-wallis committed Nov 20, 2018
1 parent 7ece495 commit 0f95cde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/controllers/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ impl TimeController {
fn update_stars(&mut self, dt: f32, state: &mut GameState, time_slow: bool) {
for star in &mut state.world.stars {
let base_speed = if time_slow { 20.0 } else { STAR_BASE_SPEED };
star.advance_wrapping(dt * base_speed * star.speed, state.world.size);
let speed = dt * base_speed * star.speed;
star.advance_wrapping(speed, state.world.size);
}
}
}
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]

#![feature(nll)]

extern crate ggez;
extern crate itertools_num;
extern crate rand;
Expand Down
3 changes: 2 additions & 1 deletion src/models/enemy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ impl Enemy {

/// Update the enemy
pub fn update(&mut self, speed: f32, player_position: Point, size: Size) {
let vector_position = self.vector.position;
// Point to the player
self.point_to(nearest_virtual_position(
self.vector.position,
vector_position,
player_position,
size
));
Expand Down

0 comments on commit 0f95cde

Please sign in to comment.