fix(compress): remove dead parameter aliases

The parameter policy leaves now export their C API names directly from Rust.
Two compatibility aliases were only used by the Rust unit test, while the
library and clippy builds correctly treated them as unused. Remove those dead
aliases and call the direct Rust-owned clamp symbol from the test so the
library, bench, and test targets share the same ABI surface without warning
under `-D warnings`.

Test Plan:
- Capped `cargo clippy --manifest-path rust/Cargo.toml -- -D warnings` -- passed.
- Capped `cargo clippy --manifest-path rust/Cargo.toml --benches -- -D warnings` -- passed.
- Capped `cargo clippy --manifest-path rust/Cargo.toml --tests -- -D warnings` -- passed.
- `cargo +nightly fmt --manifest-path rust/Cargo.toml --all -- --check` -- passed.
- `git diff --cached --check` -- passed.
This commit is contained in:
2026-07-20 12:26:13 +02:00
parent 6d9b3d24b6
commit b51b8f24d2
+1 -3
View File
@@ -1181,8 +1181,6 @@ pub extern "C" fn ZSTD_cycleLog(hashLog: u32, strategy: c_int) -> u32 {
/* Keep existing Rust parameter-module callers source-compatible while the
* C symbols are owned directly by these Rust leaves. */
pub(crate) use ZSTD_checkCParams as ZSTD_rust_params_checkCParams;
pub(crate) use ZSTD_clampCParams as ZSTD_rust_params_clampCParams;
pub(crate) use ZSTD_cycleLog as ZSTD_rust_params_cycleLog;
/// C ABI for private `ZSTD_getCParamRowSize()`.
#[no_mangle]
@@ -2689,7 +2687,7 @@ mod tests {
assert_eq!(adjusted.chainLog, 7);
assert_eq!(ZSTD_rust_params_checkCParams(adjusted), 0);
let clamped = ZSTD_rust_params_clampCParams(ZSTD_compressionParameters {
let clamped = ZSTD_clampCParams(ZSTD_compressionParameters {
windowLog: u32::MAX,
chainLog: 0,
hashLog: 0,