From 8a90a8e109b88c1c70b88f7488a0a8eb5f52d724 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 15 Aug 2023 23:51:13 -0500 Subject: fix tests --- azalea-physics/src/lib.rs | 4 ++-- azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs index 9c16caef..6fef7ad1 100644 --- a/azalea-physics/src/lib.rs +++ b/azalea-physics/src/lib.rs @@ -377,7 +377,7 @@ mod tests { let entity_pos = *app.world.get::(entity).unwrap(); // delta is applied before gravity, so the first tick only sets the delta assert_eq!(entity_pos.y, 70.); - let entity_physics = app.world.get::(entity).unwrap().clone(); + let entity_physics = app.world.get::(entity).unwrap(); assert!(entity_physics.delta.y < 0.); } app.world.run_schedule(FixedUpdate); @@ -439,7 +439,7 @@ mod tests { let entity_pos = *app.world.get::(entity).unwrap(); // delta will change, but it won't move until next tick assert_eq!(entity_pos.y, 70.); - let entity_physics = app.world.get::(entity).unwrap().clone(); + let entity_physics = app.world.get::(entity).unwrap(); assert!(entity_physics.delta.y < 0.); } app.world.run_schedule(FixedUpdate); diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs index fb805dea..6ce86ea4 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs @@ -200,7 +200,7 @@ mod tests { // just make sure it doesn't panic if let Err(e) = ClientboundPlayerChatPacket::read_from(&mut Cursor::new(&data)) { let default_backtrace = Backtrace::capture(); - let backtrace = std::any::request_ref::(&e).unwrap_or(&default_backtrace); + let backtrace = std::error::request_ref::(&e).unwrap_or(&default_backtrace); eprintln!("{e}\n{backtrace}"); panic!("failed to read player chat packet"); -- cgit v1.2.3