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