pub fn clone_from<T2>(&mut self, source: &GridSlice<T2, K>)
    where
        T2: ops::Index<(K, K), Output = <T as ops::Index<(K, K)>>::Output>,
    {
        for (y1, y2) in self.y.clone().zip(source.y.clone()) {
            for (x1, x2) in self.x.clone().zip(source.x.clone()) {
                *self.grid.index_mut((x1, y1)) = source.grid.index((x2, y2)).clone();
            }
        }
    }
/// Copy elements from other slice of same size
Copy elements from other slice of same size
Copy elements from other slice of same size
pub fn clone_from<T2>(&mut self, source: &GridSlice<T2, K>)
    where
        T2: ops::Index<(K, K), Output = <T as ops::Index<(K, K)>>::Output>,
    {
        for (y1, y2) in self.y.clone().zip(source.y.clone()) {
            for (x1, x2) in self.x.clone().zip(source.x.clone()) {
                *self.grid.index_mut((x1, y1)) = source.grid.index((x2, y2)).clone();
            }
        }
    }
pub fn clone_from < T2 > ( & mut self , source : & GridSlice < T2 , K > ) where T2 : ops :: Index < ( K , K ) , Output = < T as ops :: Index < ( K , K ) > > :: Output > , { for ( y1 , y2 ) in self . y . clone ( ) . zip ( source . y . clone ( ) ) { for ( x1 , x2 ) in self . x . clone ( ) . zip ( source . x . clone ( ) ) { * self . grid . index_mut ( ( x1 , y1 ) ) = source . grid . index ( ( x2 , y2 ) ) . clone ( ) ; } } }
Copy elements from other slice of same size
Copy elements from other slice of same size
&mut self
source
&GridSlice<T2, K>