rust•armanazi•error•[E0507]: cannot move out of `self.step` which is behind a mutable reference self.curr += self.step;
//Add "Copy +" to follow where:
impl<T> Iterator for Stepper<T>
where T:AddAssign + PartialOrd
{
type Item=T;
fn next(&mut self)->Option<T>{
if self.curr >= self.stop {
return None;
}
let res = self.curr;//[E0507]
self.curr += self.step;
Some(res)
}
}