diff options
| author | mat <git@matdoes.dev> | 2025-10-12 23:01:54 +0300 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-10-12 23:01:54 +0300 |
| commit | ee2575794e91b9457a74a95daf1dcc707058cd58 (patch) | |
| tree | df725850ef18ded5ce3f6552e17095d0f704ae84 /azalea-protocol/src/read.rs | |
| parent | 1a1402954b07cd77615d0afc026c73b008787f51 (diff) | |
| download | azalea-drasl-ee2575794e91b9457a74a95daf1dcc707058cd58.tar.xz | |
upgrade deps and clean up lots of doc comments
Diffstat (limited to 'azalea-protocol/src/read.rs')
| -rw-r--r-- | azalea-protocol/src/read.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 433a2718..d4357c9f 100644 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -83,7 +83,7 @@ pub enum FrameSplitterError { } /// Read a length, then read that amount of bytes from the `Cursor<Vec<u8>>`. If -/// there's not enough data, return None +/// there's not enough data, `None` is returned. fn parse_frame(buffer: &mut Cursor<Vec<u8>>) -> Result<Box<[u8]>, FrameSplitterError> { // copy the buffer first and read from the copy, then once we make sure // the packet is all good we read it fully @@ -183,8 +183,10 @@ pub enum DecompressionError { AboveCompressionThreshold { size: u32, maximum: u32 }, } -/// Get the decompressed bytes from a packet. It must have been decrypted -/// first. +/// Get the decompressed bytes from a packet. +/// +/// The stream must have already been decrypted before passing it to this +/// function. pub fn compression_decoder( stream: &mut Cursor<&[u8]>, compression_threshold: u32, |
