“cannot move out borrowed content” when assigning a variable from a struct field
问题 I'm learning Rust and I'm fighting against the borrow checker. I have a basic Point structure. I have a scale function that modifies all the coordinates of the point. I would like to call this method from another method named convert : struct AngleUnit; struct Point { x: f32, y: f32, z: f32, unit: AngleUnit, } fn factor(_from: AngleUnit, _to: AngleUnit) -> f32 { 1.0 } impl Point { pub fn new(x: f32, y: f32, z: f32, unit: AngleUnit) -> Point { Point { x, y, z, unit } } fn scale(&mut self,