meow clippy
This commit is contained in:
parent
f6cd7d4b57
commit
6cdeb38ba4
2 changed files with 5 additions and 5 deletions
|
@ -83,7 +83,7 @@ pub fn add_player(
|
|||
mgr: anims,
|
||||
},
|
||||
SpriteBundle {
|
||||
transform: Into::<Transform>::into(player_coords.clone()),
|
||||
transform: (*player_coords).into(),
|
||||
..Default::default()
|
||||
},
|
||||
));
|
||||
|
|
|
@ -24,16 +24,16 @@ pub struct PlayerCoords {
|
|||
block_size: f32,
|
||||
}
|
||||
|
||||
impl Into<Transform> for PlayerCoords {
|
||||
fn into(self) -> Transform {
|
||||
let PlayerCoords { x, y, block_size } = self;
|
||||
impl From<PlayerCoords> for Transform {
|
||||
fn from(val: PlayerCoords) -> Self {
|
||||
let PlayerCoords { x, y, block_size } = val;
|
||||
Transform {
|
||||
translation: Vec3 {
|
||||
x,
|
||||
y,
|
||||
z: PLAYER_DEPTH,
|
||||
},
|
||||
scale: Vec3::splat(self.block_size * PLAYER_SIZE_FRACTION),
|
||||
scale: Vec3::splat(val.block_size * PLAYER_SIZE_FRACTION),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue