remove unnecessary map_err

This commit is contained in:
mat 2024-01-20 17:35:54 -06:00
parent 73be589e7f
commit 7feee2954d
2 changed files with 4 additions and 7 deletions

View file

@ -94,11 +94,8 @@ impl RawConnection {
}
}
pub fn write_raw_packet(&self, raw_packet: Vec<u8>) -> Result<(), WritePacketError> {
self.writer
.outgoing_packets_sender
.send(raw_packet)
.map_err(WritePacketError::from)?;
pub fn write_raw_packet(&self, raw_packet: Vec<u8>) -> Result<(), WritePacketError> {
self.writer.outgoing_packets_sender.send(raw_packet)?;
Ok(())
}

View file

@ -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(())
}