diff --git a/src/imgdata.rs b/src/imgdata.rs index 8c85d5b..2408be2 100644 --- a/src/imgdata.rs +++ b/src/imgdata.rs @@ -12,16 +12,16 @@ pub struct ThinGridData { impl ThinGridData { /// Convert Grid to ThinGridData - pub fn new_from_grid(in_grid: &Grid) -> Self { + pub fn new_from_grid(in_grid: Grid) -> Self { ThinGridData { width: in_grid.width, height: in_grid.height, - data: in_grid.data.clone(), + data: in_grid.data, } } pub fn new_from_grid_vec(in_grids: &[Grid]) -> Vec { - in_grids.iter().map(Self::new_from_grid).collect() + in_grids.iter().cloned().map(Self::new_from_grid).collect() } /// from grid.rs (needed in image gen)