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/game/clientbound_update_recipes_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/game/clientbound_update_recipes_packet.rs')
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs index 4b1a322a..d15e10c3 100644 --- a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs @@ -1,4 +1,4 @@ -use std::io::Read; +use std::io::{Read, Write}; use azalea_core::{resource_location::ResourceLocation, Slot}; use packet_macros::{GamePacket, McBufReadable, McBufWritable}; @@ -35,7 +35,7 @@ pub struct ShapedRecipe { } impl McBufWritable for ShapedRecipe { - fn write_into(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> { + fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { buf.write_varint(self.width.try_into().unwrap())?; buf.write_varint(self.height.try_into().unwrap())?; buf.write_utf(&self.group)?; @@ -122,7 +122,7 @@ pub struct Ingredient { } impl McBufWritable for Recipe { - fn write_into(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> { + fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { todo!() } } |
