Fix a clippy warning, complete section 5.6

This commit is contained in:
Timothy Warren 2022-01-03 10:58:20 -05:00
parent b5bf24a3aa
commit 3c36ee7fd3

View File

@ -58,8 +58,7 @@ pub fn try_move_player(delta_x: i32, delta_y: i32, ecs: &mut World) {
let mut ppos = ecs.write_resource::<Point>(); let mut ppos = ecs.write_resource::<Point>();
ppos.x = pos.x; ppos.x = pos.x;
ppos.y = pos.y ppos.y = pos.y
} else { } else if combat_stats.get(*potential_target).is_some() {
if combat_stats.get(*potential_target).is_some() {
wants_to_melee wants_to_melee
.insert( .insert(
entity, entity,
@ -70,7 +69,6 @@ pub fn try_move_player(delta_x: i32, delta_y: i32, ecs: &mut World) {
.expect("Add target failed"); .expect("Add target failed");
return; return;
} }
}
if let Some(door) = doors.get_mut(*potential_target) { if let Some(door) = doors.get_mut(*potential_target) {
door.open = true; door.open = true;