mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 05:15:49 -06:00
chore: solve clippy warnings
This commit is contained in:
@@ -28,7 +28,6 @@ pub trait CommonPlatform {
|
||||
fn get_canvas_size(&self) -> Option<(u32, u32)>;
|
||||
|
||||
/// Loads raw asset data using the appropriate platform-specific method.
|
||||
|
||||
fn get_asset_bytes(&self, asset: Asset) -> Result<Cow<'static, [u8]>, AssetError>;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use pacman::map::direction::Direction;
|
||||
#[test]
|
||||
fn test_game_command_variants() {
|
||||
// Test that all GameCommand variants can be created
|
||||
let commands = vec![
|
||||
let commands = [
|
||||
GameCommand::Exit,
|
||||
GameCommand::MovePlayer(Direction::Up),
|
||||
GameCommand::MovePlayer(Direction::Down),
|
||||
@@ -38,17 +38,6 @@ fn test_game_command_equality() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_game_command_copy_clone() {
|
||||
let original = GameCommand::MovePlayer(Direction::Up);
|
||||
let copied = original;
|
||||
let cloned = original.clone();
|
||||
|
||||
assert_eq!(original, copied);
|
||||
assert_eq!(original, cloned);
|
||||
assert_eq!(copied, cloned);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_game_event_variants() {
|
||||
let command_event = GameEvent::Command(GameCommand::Exit);
|
||||
|
||||
Reference in New Issue
Block a user