Fix warnings
This commit is contained in:
parent
e90a10262b
commit
20cb9f88fa
2 changed files with 5 additions and 6 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue