From dedcd0de8f017a00645b31cfdc1819a4e8da0850 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 1 May 2022 23:35:30 -0500 Subject: impl Write instead of Vec for consistency --- .../src/packets/game/clientbound_player_abilities_packet.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs') diff --git a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs index 3ca1ac85..cd645fe6 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs @@ -1,7 +1,6 @@ -use std::io::Read; - use crate::mc_buf::{McBufReadable, McBufWritable, Readable}; use packet_macros::GamePacket; +use std::io::{Read, Write}; #[derive(Clone, Debug, GamePacket)] pub struct ClientboundPlayerAbilitiesPacket { @@ -32,7 +31,7 @@ impl McBufReadable for PlayerAbilitiesFlags { } impl McBufWritable for PlayerAbilitiesFlags { - fn write_into(&self, buf: &mut Vec) -> Result<(), std::io::Error> { + fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut byte = 0; if self.invulnerable { byte = byte | 1; -- cgit v1.2.3