tiny one line change to fix writing packets not working (#290)

## Description

With component division, the WritePacket trait was pub(crate), which
disallowed writing packets outside of valence. This 1 line PR fixes
that.

## Test Plan

It might be a good idea to include examples/tests that use packet
writing to catch this, but it's most likely not strictly necessary.
This commit is contained in:
Joe Sorensen 2023-03-15 08:36:55 -06:00 committed by GitHub
parent 68cf6e83a0
commit 255b78e02c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ use valence_protocol::codec::{encode_packet, encode_packet_compressed, PacketEnc
use valence_protocol::Packet; use valence_protocol::Packet;
/// Types that can have packets written to them. /// Types that can have packets written to them.
pub(crate) trait WritePacket { pub trait WritePacket {
/// Writes a packet to this object. Encoding errors are typically logged and /// Writes a packet to this object. Encoding errors are typically logged and
/// discarded. /// discarded.
fn write_packet<'a>(&mut self, packet: &impl Packet<'a>); fn write_packet<'a>(&mut self, packet: &impl Packet<'a>);