```
use std::ops::Add;
#[derive(Debug)]
pub struct Vec3<N>{
    x: N,
    y: N,
    z: N
}
impl<N> Vec3<N>{
    pub fn new(x: N, y: N , z: N) -> Vec3<N>{
        Vec3{x:x,y:y,z:z}
    }
}
impl<N : Clone + Add<Output=N>> Vec3<N>{
    pub fn  add(&mut self,v: &Vec3<N>){
        self.x = self.x.clone() + v.x.clone();
        self.y = self.y.clone() + v.y.clone();
        self.z = self.z.clone() + v.z.clone();
    }
}
impl<N: Add<Output=N>> Add for Vec3<N>{
    type Output = Vec3<N>;
    fn add(self, v: Vec3<N>) -> Vec3<N>{
        Vec3{x: self.x + v.x
            ,y: self.y + v.y 
            ,z: self.z + v.z} 
    }
}

```

This allows me to write.

```
mod vec3;
use vec3::*;
fn main() {
    let mut v1 = Vec3::<f32>::new(1.0,2.0,3.0);
    let v2 = Vec3::<f32>::new(1.0,2.0,3.0);
    v1.add(&v2);
    let v3 = v1 + v2;

    println!("{:?}", v3);
}

```

This `let v3 = v1 + v2;` consumes v1 and v2. But that is probably not always wanted, so I added another add function with the signature `pub fn add(&mut self,v: &Vec3<N>)` 

My problem is with this code snippet

```
impl<N : Clone + Add<Output=N>> Vec3<N>{
    pub fn  add(&mut self,v: &Vec3<N>){
        self.x = self.x.clone() + v.x.clone();
        self.y = self.y.clone() + v.y.clone();
        self.z = self.z.clone() + v.z.clone();
    }
}

```

I needed to clone the values of both vectors in order to avoid a move. But I really wanted to write it like this

`self.x = self.x + v.x.clone();` or `self.x += v.x.clone();` I don't see why I would have to clone both values.

How could this be done?