From 7feee2954d14ecd42e1b0a5143d4540ef79a941d Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 20 Jan 2024 17:35:54 -0600 Subject: remove unnecessary map_err --- azalea-client/src/raw_connection.rs | 9 +++------ azalea-protocol/src/packets/game/clientbound_explode_packet.rs | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/azalea-client/src/raw_connection.rs b/azalea-client/src/raw_connection.rs index 53abd881..9f7a85f1 100644 --- a/azalea-client/src/raw_connection.rs +++ b/azalea-client/src/raw_connection.rs @@ -94,11 +94,8 @@ impl RawConnection { } } - pub fn write_raw_packet(&self, raw_packet: Vec) -> Result<(), WritePacketError> { - self.writer - .outgoing_packets_sender - .send(raw_packet) - .map_err(WritePacketError::from)?; + pub fn write_raw_packet(&self, raw_packet: Vec) -> Result<(), WritePacketError> { + self.writer.outgoing_packets_sender.send(raw_packet)?; Ok(()) } @@ -114,7 +111,7 @@ impl RawConnection { ) -> Result<(), WritePacketError> { let raw_packet = serialize_packet(&packet)?; self.write_raw_packet(raw_packet)?; - + Ok(()) } diff --git a/azalea-protocol/src/packets/game/clientbound_explode_packet.rs b/azalea-protocol/src/packets/game/clientbound_explode_packet.rs index 58e61e2e..23c416d1 100755 --- a/azalea-protocol/src/packets/game/clientbound_explode_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_explode_packet.rs @@ -121,7 +121,7 @@ impl McBufWritable for ClientboundExplodePacket { let sound_event_resource_location = ResourceLocation::new(&self.explosion_sound.to_string()); - sound_event_resource_location.write_into(buf)?; + sound_event_resource_location.write_into(buf)?; Ok(()) } -- cgit v1.2.3