imgdata: make new_from_grid not take a reference
This commit is contained in:
parent
e3fff76792
commit
e6cfab4a02
@ -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<Self> {
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user