make seperate struct for buffer

This commit is contained in:
Simon Gardling
2021-04-01 13:56:10 -04:00
parent d887b13579
commit af0b9f9222
6 changed files with 63 additions and 24 deletions

View File

@@ -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();
}