Fix some clippy warnings

This commit is contained in:
Timothy Warren 2021-12-02 15:03:55 -05:00
parent 0f8d4d8fab
commit 731e6dd243
2 changed files with 4 additions and 7 deletions

View File

@ -23,12 +23,9 @@ impl From<Point> for Position {
}
}
impl Into<Point> for Position {
fn into(self) -> Point {
Point {
x: self.x,
y: self.y,
}
impl From<Position> for Point {
fn from(p: Position) -> Self {
Point { x: p.x, y: p.y }
}
}

View File

@ -28,7 +28,7 @@ impl MapBuilder for SimpleMapBuilder {
}
fn get_starting_position(&self) -> Position {
self.starting_position.clone()
self.starting_position
}
fn get_snapshot_history(&self) -> Vec<Map> {