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 { impl From<Position> for Point {
fn into(self) -> Point { fn from(p: Position) -> Self {
Point { Point { x: p.x, y: p.y }
x: self.x,
y: self.y,
}
} }
} }

View File

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