Why can't I just use &self
in the Add
trait:
pub trait Add<RHS = Self> {
type Output;
fn add(self, rhs: RHS) -> Self::Output;
}
That way I don't have to worry about my struct moving after I use the +
operator. It's generally not a problem for me cause I use #[derive(Debug, Copy, Clone)]
but still I wonder why.