aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/mc_buf/write.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/mc_buf/write.rs
parent4d75415130a008f83c3bd594ca4cefd01f3d53dd (diff)
parentdb2fcecdc38ea7a43b098c6282dd906b73981f97 (diff)
downloadazalea-drasl-bec2da64d81883e3ea909452e71e17b9d22b2adc.tar.xz
Merge branch 'main' into chunk-decoding
Diffstat (limited to 'azalea-protocol/src/mc_buf/write.rs')
-rwxr-xr-xazalea-protocol/src/mc_buf/write.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/azalea-protocol/src/mc_buf/write.rs b/azalea-protocol/src/mc_buf/write.rs
index e5437ae8..57ec3a48 100755
--- a/azalea-protocol/src/mc_buf/write.rs
+++ b/azalea-protocol/src/mc_buf/write.rs
@@ -1,5 +1,4 @@
use super::{UnsizedByteArray, MAX_STRING_LENGTH};
-use async_trait::async_trait;
use azalea_chat::component::Component;
use azalea_core::{
difficulty::Difficulty, game_type::GameType, resource_location::ResourceLocation,
@@ -9,7 +8,6 @@ use byteorder::{BigEndian, WriteBytesExt};
use std::io::Write;
use uuid::Uuid;
-#[async_trait]
pub trait Writable {
fn write_list<F, T>(&mut self, list: &[T], writer: F) -> Result<(), std::io::Error>
where
@@ -48,7 +46,6 @@ pub trait Writable {
fn write_uuid(&mut self, uuid: &Uuid) -> Result<(), std::io::Error>;
}
-#[async_trait]
impl Writable for Vec<u8> {
fn write_list<F, T>(&mut self, list: &[T], writer: F) -> Result<(), std::io::Error>
where
@@ -363,9 +360,8 @@ impl McBufWritable for Difficulty {
}
// Component
-#[async_trait]
impl McBufWritable for Component {
- // async fn read_into<R>(buf: &mut R) -> Result<Self, String>
+ // async fn read_into(buf: &mut impl Read) -> Result<Self, String>
// where
// R: AsyncRead + std::marker::Unpin + std::marker::Send,
// {