meow clippy

This commit is contained in:
TudbuT 2024-11-23 18:48:35 +01:00
parent f6cd7d4b57
commit 6cdeb38ba4
2 changed files with 5 additions and 5 deletions

View file

@ -83,7 +83,7 @@ pub fn add_player(
mgr: anims, mgr: anims,
}, },
SpriteBundle { SpriteBundle {
transform: Into::<Transform>::into(player_coords.clone()), transform: (*player_coords).into(),
..Default::default() ..Default::default()
}, },
)); ));

View file

@ -24,16 +24,16 @@ pub struct PlayerCoords {
block_size: f32, block_size: f32,
} }
impl Into<Transform> for PlayerCoords { impl From<PlayerCoords> for Transform {
fn into(self) -> Transform { fn from(val: PlayerCoords) -> Self {
let PlayerCoords { x, y, block_size } = self; let PlayerCoords { x, y, block_size } = val;
Transform { Transform {
translation: Vec3 { translation: Vec3 {
x, x,
y, y,
z: PLAYER_DEPTH, z: PLAYER_DEPTH,
}, },
scale: Vec3::splat(self.block_size * PLAYER_SIZE_FRACTION), scale: Vec3::splat(val.block_size * PLAYER_SIZE_FRACTION),
..Default::default() ..Default::default()
} }
} }