aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-01 23:06:56 -0500
committermat <github@matdoes.dev>2022-05-01 23:06:56 -0500
commitbec2da64d81883e3ea909452e71e17b9d22b2adc (patch)
treed4f94abc09534768f2531a4c23f54dcc2dab2814 /azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
parent4d75415130a008f83c3bd594ca4cefd01f3d53dd (diff)
parentdb2fcecdc38ea7a43b098c6282dd906b73981f97 (diff)
downloadazalea-drasl-bec2da64d81883e3ea909452e71e17b9d22b2adc.tar.xz
Merge branch 'main' into chunk-decoding
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_recipe_packet.rs')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_recipe_packet.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs b/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
index 69f26ddc..4847bbf8 100644
--- a/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs
@@ -1,8 +1,6 @@
-use async_trait::async_trait;
-use azalea_chat::component::Component;
use azalea_core::{resource_location::ResourceLocation, Slot};
use packet_macros::{GamePacket, McBufReadable, McBufWritable};
-use tokio::io::AsyncRead;
+use std::io::Read;
use crate::mc_buf::{McBufReadable, McBufWritable, Readable, Writable};
@@ -42,13 +40,9 @@ impl McBufWritable for State {
Ok(())
}
}
-#[async_trait]
impl McBufReadable for State {
- async fn read_into<R>(buf: &mut R) -> Result<Self, String>
- where
- R: AsyncRead + std::marker::Unpin + std::marker::Send,
- {
- let state = buf.read_varint().await?.try_into().unwrap();
+ fn read_into(buf: &mut impl Read) -> Result<Self, String> {
+ let state = buf.read_varint()?.try_into().unwrap();
Ok(match state {
0 => State::Init,
1 => State::Add,