From e18b05e920779223fd8d10cf9fe18bcf59803a9e Mon Sep 17 00:00:00 2001 From: ddidderr Date: Mon, 20 Jul 2026 13:38:08 +0200 Subject: [PATCH] fix(compress): keep test-only parameter import local The new context-parameter projection test is compiled only in test builds, but its constant was imported at module scope. Keep the import in the test module so normal clippy builds remain warning-free under `-D warnings`. Test Plan: - `git diff --cached --check` -- passed. - Root capped clippy rerun after this commit. --- rust/src/zstd_compress_params_api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/zstd_compress_params_api.rs b/rust/src/zstd_compress_params_api.rs index c6c6b9a0c..e53695178 100644 --- a/rust/src/zstd_compress_params_api.rs +++ b/rust/src/zstd_compress_params_api.rs @@ -21,8 +21,7 @@ use crate::zstd_compress_params::{ ZSTD_rust_params_resolveEnableLdm, ZSTD_rust_params_resolveExternalRepcodeSearch, ZSTD_rust_params_resolveExternalSequenceValidation, ZSTD_rust_params_resolveMaxBlockSize, ZSTD_rust_params_resolveRowMatchFinderMode, ZSTD_CONTENTSIZE_UNKNOWN, - ZSTD_RUST_CPM_CREATE_CDICT, ZSTD_RUST_CPM_NO_ATTACH_DICT, ZSTD_RUST_PS_AUTO, - ZSTD_RUST_PS_DISABLE, ZSTD_RUST_PS_ENABLE, + ZSTD_RUST_CPM_CREATE_CDICT, ZSTD_RUST_PS_AUTO, ZSTD_RUST_PS_DISABLE, ZSTD_RUST_PS_ENABLE, }; use std::mem::size_of; use std::os::raw::{c_int, c_void}; @@ -1192,6 +1191,7 @@ pub unsafe extern "C" fn ZSTD_CCtxParams_registerSequenceProducer( mod tests { use super::*; use crate::errors::{ERR_getErrorCode, ERR_isError}; + use crate::zstd_compress_params::ZSTD_RUST_CPM_NO_ATTACH_DICT; use std::mem::{align_of, offset_of, size_of, MaybeUninit}; use std::sync::atomic::{AtomicUsize, Ordering};