aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src')
-rwxr-xr-xazalea-protocol/src/read.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs
index 50764c88..01744169 100755
--- a/azalea-protocol/src/read.rs
+++ b/azalea-protocol/src/read.rs
@@ -116,7 +116,7 @@ fn parse_frame(buffer: &mut Cursor<Vec<u8>>) -> Result<Box<[u8]>, FrameSplitterE
if buffer.position() == buffer.get_ref().len() as u64 {
// reset the inner vec once we've reached the end of the buffer so we don't keep
// leaking memory
- *buffer.get_mut() = Vec::new();
+ buffer.get_mut().clear();
buffer.set_position(0);
}