Skip to content

Commit

Permalink
safety note & bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarks committed Jan 7, 2025
1 parent 5ac408b commit 287dbd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lz4"
license = "MIT"
version = "1.28.0"
version = "1.28.1"
readme = "README.md"
authors = [ "Jens Heyens <[email protected]>", "Artem V. Navrotskiy <[email protected]>", "Patrick Marks <[email protected]>"]
description = "Rust LZ4 bindings library."
Expand Down
3 changes: 3 additions & 0 deletions src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ use std::ptr;

const BUFFER_SIZE: usize = 32 * 1024;

// NOTE: unsafe to device Clone or Copy, otherwise
// there can be multiple copies of the same inner LZ4 pointer
#[derive(Debug)]
struct DecoderContext {
c: LZ4FDecompressionContext,
}

// NOTE: unsafe to derive Clone or Copy
#[derive(Debug)]
pub struct Decoder<R> {
c: DecoderContext,
Expand Down

0 comments on commit 287dbd0

Please sign in to comment.