fix(zstd): import seekable directly for security tests

Use zstd_safe::seekable in the security test and document why the
seekable dev-dependency stays: it enables the feature and must remain
visible to cargo-shear as a real usage.

Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
Hauser Zhi
2026-11-21 21:24:52 +08:00
parent e5a31d2838
commit 04ab87754a
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -29,6 +29,8 @@ zdict_builder = ["zstd_fixed/zdict_builder"]
zstdmt = ["zstd_fixed/zstdmt"]
[dev-dependencies]
# Enables zstd-safe's `seekable` feature for tests/security.rs. The test imports
# `zstd_safe::seekable` directly so cargo-shear treats this as a used dependency.
zstd-safe = { version = "8.3.0", features = ["seekable"] }
toml = "1.2.2"
semver = "1.0.28"
+1 -1
View File
@@ -86,7 +86,7 @@ fn corrupt_legacy_frame_cannot_emit_bytes_when_writer_is_dropped() {
#[test]
fn seekable_offsets_past_eof_keep_vec_length_within_capacity() {
use zstd::zstd_safe::seekable::{Seekable, SeekableCStream};
use zstd_safe::seekable::{Seekable, SeekableCStream};
let source = b"seekable frame fixture with enough data for several independent frames";
let mut encoded = [0; 1024];