diff options
| author | mat <github@matdoes.dev> | 2022-05-01 23:35:30 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-01 23:38:55 -0500 |
| commit | dedcd0de8f017a00645b31cfdc1819a4e8da0850 (patch) | |
| tree | 7005291337dcc5a9cd1c5bb71668b511a6834d23 /azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | |
| parent | db2fcecdc38ea7a43b098c6282dd906b73981f97 (diff) | |
| download | azalea-drasl-dedcd0de8f017a00645b31cfdc1819a4e8da0850.tar.xz | |
impl Write instead of Vec<u8> for consistency
Diffstat (limited to 'azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs index bcdcd105..dd077ced 100755 --- a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs @@ -1,4 +1,4 @@ -use std::io::Read; +use std::io::{Read, Write}; use super::LoginPacket; use crate::mc_buf::{Readable, Writable}; @@ -17,7 +17,7 @@ impl ClientboundGameProfilePacket { LoginPacket::ClientboundGameProfilePacket(self) } - pub fn write(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> { + pub fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for n in self.game_profile.uuid.to_int_array() { buf.write_int(n as i32).unwrap(); } |
