aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-chat/src')
-rwxr-xr-xazalea-chat/src/component.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs
index 6cf1ec09..81224d9f 100755
--- a/azalea-chat/src/component.rs
+++ b/azalea-chat/src/component.rs
@@ -1,6 +1,6 @@
use std::{
fmt::Display,
- io::{Read, Write},
+ io::{Cursor, Write},
};
use azalea_buf::{BufReadError, McBufReadable, McBufWritable};
@@ -239,7 +239,7 @@ impl<'de> Deserialize<'de> for Component {
}
impl McBufReadable for Component {
- fn read_from(buf: &mut impl Read) -> Result<Self, BufReadError> {
+ fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
let string = String::read_from(buf)?;
let json: serde_json::Value = serde_json::from_str(string.as_str())?;
let component = Component::deserialize(json)?;