Skip to content

Commit a736311

Browse files
committed
Update lz4_flex version
1 parent 57805f7 commit a736311

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bytecode/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "MIT"
1111
[dependencies]
1212
bincode = "1.1"
1313
bitflags = "1.1"
14-
lz4_flex = "0.4"
14+
lz4_flex = "0.5"
1515
num-bigint = { version = "0.3", features = ["serde"] }
1616
num-complex = { version = "0.3", features = ["serde"] }
1717
serde = { version = "1.0", features = ["derive"] }

bytecode/src/bytecode.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,12 +732,6 @@ impl<C: Constant> CodeObject<C> {
732732
impl CodeObject<ConstantData> {
733733
/// Load a code object from bytes
734734
pub fn from_bytes(data: &[u8]) -> Result<Self, Box<dyn std::error::Error>> {
735-
// TODO: PR to lz4_flex to make it not panic
736-
if data.len() < 4 {
737-
return Err(
738-
std::io::Error::new(std::io::ErrorKind::UnexpectedEof, "bad bytecode").into(),
739-
);
740-
}
741735
let raw_bincode = lz4_flex::decompress_size_prepended(data)?;
742736
let data = bincode::deserialize(&raw_bincode)?;
743737
Ok(data)

0 commit comments

Comments
 (0)