From 36034d79acde5039601a0fdf2f9c5e19b5f91003 Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 6 Apr 2020 21:06:17 +0200 Subject: minor refactoring with cargo clippy --- src/controls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controls.rs') diff --git a/src/controls.rs b/src/controls.rs index 7ed8374..8a10824 100644 --- a/src/controls.rs +++ b/src/controls.rs @@ -29,7 +29,7 @@ impl Direction { } } - pub fn to_position(&self) -> Pos { + pub fn to_position(self) -> Pos { match self { Direction::North => Pos::new(0, -1), Direction::South => Pos::new(0, 1), -- cgit