Skip to content

Commit 171f98c

Browse files
committed
chore: use read_exact in decompress_lz4
1 parent c60191a commit 171f98c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/common/arrow/src/arrow/io/ipc/compression.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16+
use std::io::Read;
17+
1618
use crate::arrow::error::Result;
1719

1820
#[cfg(feature = "io_ipc_compression")]
1921
#[cfg_attr(docsrs, doc(cfg(feature = "io_ipc_compression")))]
2022
pub fn decompress_lz4(input_buf: &[u8], output_buf: &mut [u8]) -> Result<()> {
2123
use std::io::Read;
22-
let _ = lz4_flex::frame::FrameDecoder::new(input_buf).read(output_buf)?;
24+
lz4_flex::frame::FrameDecoder::new(input_buf).read_exact(output_buf)?;
2325
Ok(())
2426
}
2527

0 commit comments

Comments
 (0)