diff options
| author | mat <github@matdoes.dev> | 2022-05-01 23:35:30 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-01 23:35:30 -0500 |
| commit | a24d00d99819166a147af77dc50ff61dff5cb04a (patch) | |
| tree | de2fc9ae04047e1dbfe6f343959907bdd2060b37 /azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs | |
| parent | bec2da64d81883e3ea909452e71e17b9d22b2adc (diff) | |
| download | azalea-drasl-a24d00d99819166a147af77dc50ff61dff5cb04a.tar.xz | |
impl Write instead of Vec<u8> for consistency
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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<u8>) -> 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; |
