How to prevent a value from being moved?
问题 I'm having a lot of fun trying to solve the robot simulator Exercism exercise, but I'm facing a value moving problem for which I don't seem to be able to come up with an elegant solution: impl Robot { pub fn new(x: isize, y: isize, d: Direction) -> Self { Robot { position: Coordinate { x: x, y: y }, direction: d } } pub fn turn_right(mut self) -> Self { match self.direction { // ... }; self } pub fn turn_left(mut self) -> Self { match self.direction { // ... }; self } pub fn advance(mut self)