Skip to content

Commit c955480

Browse files
committed
update default behaviour
1 parent dfb572e commit c955480

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

crates/codec/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ derive_more = { version = "2.0", default-features = false }
2020
eyre = { workspace = true, optional = true }
2121
thiserror = { version = "2.0", default-features = false }
2222
zstd = { version = "=0.13.3", optional = true }
23-
ruzstd = { version = "0.8", optional = true }
23+
ruzstd = "0.8"
2424

2525
[dev-dependencies]
2626
eyre.workspace = true
@@ -30,4 +30,3 @@ serde_json = "1.0"
3030
default = ["zstd"]
3131
test-utils = ["dep:eyre", "scroll-l1/test-utils"]
3232
zstd = ["dep:zstd"]
33-
ruzstd = ["dep:ruzstd"]

crates/codec/src/decoding/v2/zstd.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
33
use std::io::Read;
44

5+
#[cfg(feature = "zstd")]
6+
use ruzstd as _;
7+
58
/// The ZSTD magic number for zstd compressed data header.
69
const ZSTD_MAGIC_NUMBER: [u8; 4] = [0x28, 0xb5, 0x2f, 0xfd];
710

8-
#[cfg(not(any(feature = "zstd", feature = "ruzstd")))]
9-
compile_error!("Either feature \"zstd\" or \"ruzstd\" must be enabled for zstd support.");
10-
1111
/// Uncompress the provided data.
1212
#[cfg(feature = "zstd")]
1313
pub fn decompress_blob_data(data: &[u8]) -> Vec<u8> {
@@ -37,7 +37,7 @@ pub fn decompress_blob_data(data: &[u8]) -> Vec<u8> {
3737
}
3838

3939
/// Uncompress the provided data.
40-
#[cfg(feature = "ruzstd")]
40+
#[cfg(not(feature = "zstd"))]
4141
pub fn decompress_blob_data(data: &[u8]) -> Vec<u8> {
4242
use ruzstd::decoding::StreamingDecoder;
4343

0 commit comments

Comments
 (0)