Skip to content

Commit

Permalink
remove unnecessary map_err
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Jan 20, 2024
1 parent 73be589 commit 7feee29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions azalea-client/src/raw_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand All @@ -114,7 +111,7 @@ impl RawConnection {
) -> Result<(), WritePacketError> {
let raw_packet = serialize_packet(&packet)?;
self.write_raw_packet(raw_packet)?;

Ok(())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit 7feee29

Please sign in to comment.