I loop over a vector of sensor readings with for r in readings { ... } and then try to use readings again after the loop. The compiler reports a borrow of a moved value and suggests iterating over &readings. With readings.iter() it compiles, but then the closure in .map(|r| ...) receives a reference instead of a value and I end up sprinkling * around.
What exactly do iter(), iter_mut() and into_iter() yield, and which one does a plain for loop use?




