clippy
This commit is contained in:
parent
41ba5f248c
commit
b7bb810065
@ -13,8 +13,8 @@ pub struct ThinGridData {
|
|||||||
impl Clone for ThinGridData {
|
impl Clone for ThinGridData {
|
||||||
fn clone(&self) -> ThinGridData {
|
fn clone(&self) -> ThinGridData {
|
||||||
ThinGridData {
|
ThinGridData {
|
||||||
width: self.width.clone(),
|
width: self.width,
|
||||||
height: self.height.clone(),
|
height: self.height,
|
||||||
data: self.data.clone(),
|
data: self.data.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -23,9 +23,9 @@ impl Clone for ThinGridData {
|
|||||||
impl ThinGridData {
|
impl ThinGridData {
|
||||||
// Convert Grid to ThinGridData
|
// Convert Grid to ThinGridData
|
||||||
pub fn from_grid(in_grid: &Grid) -> Self {
|
pub fn from_grid(in_grid: &Grid) -> Self {
|
||||||
return ThinGridData {
|
ThinGridData {
|
||||||
width: in_grid.width.clone(),
|
width: in_grid.width,
|
||||||
height: in_grid.height.clone(),
|
height: in_grid.height,
|
||||||
data: in_grid.data.clone(),
|
data: in_grid.data.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ impl ThinGridData {
|
|||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn from_grid_vec(in_grids: Vec<Grid>) -> Vec<Self> {
|
pub fn from_grid_vec(in_grids: Vec<Grid>) -> Vec<Self> {
|
||||||
return in_grids.iter().map(|grid|{
|
return in_grids.iter().map(|grid|{
|
||||||
return Self::from_grid(grid);
|
Self::from_grid(grid)
|
||||||
}).collect();
|
}).collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -174,7 +174,7 @@ impl Model {
|
|||||||
|
|
||||||
fn strip_grid_data(grids: Vec<Grid>) -> Vec<ThinGridData> {
|
fn strip_grid_data(grids: Vec<Grid>) -> Vec<ThinGridData> {
|
||||||
return grids.iter().map(|grid| {
|
return grids.iter().map(|grid| {
|
||||||
return ThinGridData::from_grid(grid);
|
ThinGridData::from_grid(grid)
|
||||||
}).collect();
|
}).collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user