Fix warnings

This commit is contained in:
Alex Page 2022-01-26 18:45:54 -05:00
parent e90a10262b
commit 20cb9f88fa
2 changed files with 5 additions and 6 deletions

View file

@ -10,6 +10,6 @@ pub struct Position {
impl PartialEq<Point> for Position { impl PartialEq<Point> for Position {
fn eq(&self, other: &Point) -> bool { fn eq(&self, other: &Point) -> bool {
return self.x == other.x && self.y == other.y; self.x == other.x && self.y == other.y
} }
} }

View file

@ -125,10 +125,9 @@ impl Map {
} }
pub fn is_solid(&self, point: Point) -> bool { pub fn is_solid(&self, point: Point) -> bool {
match self.get_tile_at(point) { matches!(
TileType::Wall => true, self.get_tile_at(point),
TileType::BreakableWall => true, TileType::Wall | TileType::BreakableWall
_ => false, )
}
} }
} }