rust•armanazi•error•[E0368]: binary assignment operation `+=` cannot be applied to type `T`
use std::ops::AddAssign;
//Add "AddAssign +" to follow where:
impl<T> Iterator for Stepper<T>
where T: Copy + PartialOrd
{
type Item=T;
fn next(&mut self)->Option<T>{
if self.curr >= self.stop {
return None;
}
let res = self.curr;
self.curr += self.step;//[E0368]
Some(res)
}
}