From deb7cf8ff7340108bc0714231a5ce222bae46209 Mon Sep 17 00:00:00 2001 From: Kastixx Date: Mon, 16 Jan 2023 14:10:53 +0300 Subject: [PATCH] Tiny documentation fix on lz4::block::compress_to_buffer A couple of small fixes on doc comment of `lz4::block::compress_to_buffer`: * mentioned maximum buffer length * fixed a typo --- src/block/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/block/mod.rs b/src/block/mod.rs index 7f64db808..c17384b68 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -95,7 +95,8 @@ pub fn compress(src: &[u8], mode: Option, prepend_size: bool) - /// /// # Errors /// Returns std::io::Error with ErrorKind::InvalidInput if the src buffer is too long. -/// Returns std::io::Error with ErrorKind::Other if the compression data does not find in `buffer`. +/// The buffer cannot be larger than `i32::MAX`. +/// Returns std::io::Error with ErrorKind::Other if the compression data does not fit in `buffer`. pub fn compress_to_buffer( src: &[u8], mode: Option,