Autofix a bunch of lints

This commit is contained in:
GBA bot 2022-01-01 12:11:21 +00:00
parent 6bd4a52f01
commit 42be969c1f

View file

@ -700,14 +700,14 @@ impl<'a, 'b, 'c> PlayingLevel<'a, 'b> {
self.player.update_frame( self.player.update_frame(
&self.input, &self.input,
self.timer, self.timer,
&self.background.level, self.background.level,
&self.enemies, &self.enemies,
sfx_player, sfx_player,
); );
for enemy in self.enemies.iter_mut() { for enemy in self.enemies.iter_mut() {
match enemy.update( match enemy.update(
&self.background.level, self.background.level,
self.player.wizard.position, self.player.wizard.position,
self.player.hat_state, self.player.hat_state,
self.timer, self.timer,
@ -731,7 +731,7 @@ impl<'a, 'b, 'c> PlayingLevel<'a, 'b> {
player_dead |= self player_dead |= self
.player .player
.wizard .wizard
.killision_at_point(&self.background.level, self.player.wizard.position); .killision_at_point(self.background.level, self.player.wizard.position);
if player_dead { if player_dead {
UpdateState::Dead UpdateState::Dead
} else if self } else if self
@ -760,12 +760,12 @@ impl<'a, 'b, 'c> PlayingLevel<'a, 'b> {
let mut target_position = ((current_centre * 3 + new_target_position) / 4) - half_screen; let mut target_position = ((current_centre * 3 + new_target_position) / 4) - half_screen;
target_position.x = target_position.x.clamp( target_position.x = target_position.x.clamp(
0.into(), 0,
((self.background.level.dimensions.x * 8 - (WIDTH as u32)) as i32).into(), ((self.background.level.dimensions.x * 8 - (WIDTH as u32)) as i32),
); );
target_position.y = target_position.y.clamp( target_position.y = target_position.y.clamp(
0.into(), 0,
((self.background.level.dimensions.y * 8 - (HEIGHT as u32)) as i32).into(), ((self.background.level.dimensions.y * 8 - (HEIGHT as u32)) as i32),
); );
target_position.into() target_position.into()