From dd557c8f293dbef3e2e881bcb1a85a7697a1ebbb Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 23 Feb 2025 08:47:17 +0000 Subject: fix memory leak in simulation tests (lol) also, change some vecs into boxed slices, and add RelativeEntityUpdate::new --- azalea-client/src/plugins/packet/config/events.rs | 4 ++-- azalea-client/src/plugins/packet/config/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-client/src/plugins/packet/config') diff --git a/azalea-client/src/plugins/packet/config/events.rs b/azalea-client/src/plugins/packet/config/events.rs index 6b647d74..a9b2179a 100644 --- a/azalea-client/src/plugins/packet/config/events.rs +++ b/azalea-client/src/plugins/packet/config/events.rs @@ -2,15 +2,15 @@ use std::io::Cursor; use azalea_protocol::{ packets::{ - config::{ClientboundConfigPacket, ServerboundConfigPacket}, Packet, + config::{ClientboundConfigPacket, ServerboundConfigPacket}, }, read::deserialize_packet, }; use bevy_ecs::prelude::*; use tracing::{debug, error}; -use crate::{raw_connection::RawConnection, InConfigState}; +use crate::{InConfigState, raw_connection::RawConnection}; #[derive(Event, Debug, Clone)] pub struct ReceiveConfigPacketEvent { diff --git a/azalea-client/src/plugins/packet/config/mod.rs b/azalea-client/src/plugins/packet/config/mod.rs index 5cb19b9d..2e0ce354 100644 --- a/azalea-client/src/plugins/packet/config/mod.rs +++ b/azalea-client/src/plugins/packet/config/mod.rs @@ -1,7 +1,7 @@ mod events; -use azalea_protocol::packets::config::*; use azalea_protocol::packets::ConnectionProtocol; +use azalea_protocol::packets::config::*; use bevy_ecs::prelude::*; use bevy_ecs::system::SystemState; pub use events::*; @@ -12,7 +12,7 @@ use crate::client::InConfigState; use crate::disconnect::DisconnectEvent; use crate::packet::game::KeepAliveEvent; use crate::raw_connection::RawConnection; -use crate::{declare_packet_handlers, InstanceHolder}; +use crate::{InstanceHolder, declare_packet_handlers}; pub fn process_packet_events(ecs: &mut World) { let mut events_owned = Vec::new(); -- cgit v1.2.3