make seperate struct for buffer
This commit is contained in:
@@ -22,7 +22,7 @@ impl Clone for ThinGridData {
|
||||
|
||||
impl ThinGridData {
|
||||
// Convert Grid to ThinGridData
|
||||
pub fn from_grid(in_grid: &Grid) -> Self {
|
||||
pub fn new_from_grid(in_grid: &Grid) -> Self {
|
||||
ThinGridData {
|
||||
width: in_grid.width,
|
||||
height: in_grid.height,
|
||||
@@ -31,9 +31,9 @@ impl ThinGridData {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn from_grid_vec(in_grids: Vec<Grid>) -> Vec<Self> {
|
||||
pub fn new_from_grid_vec(in_grids: Vec<Grid>) -> Vec<Self> {
|
||||
return in_grids.iter().map(|grid|{
|
||||
Self::from_grid(grid)
|
||||
Self::new_from_grid(grid)
|
||||
}).collect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user