diff --git a/rustfs/src/app/bucket_list_through.rs b/rustfs/src/app/bucket_list_through.rs index e160449d4..aae3b9a18 100644 --- a/rustfs/src/app/bucket_list_through.rs +++ b/rustfs/src/app/bucket_list_through.rs @@ -39,7 +39,6 @@ use crate::on_demand_migration::{ source_list_plan, }; use futures::StreamExt; -use http::HeaderMap; use rustfs_utils::http::{SUFFIX_SOURCE_PROXY_REQUEST, get_header}; use std::sync::Arc; use std::time::Instant; @@ -515,6 +514,7 @@ mod tests { FilterConfig, MAX_LIST_NO_PROGRESS_PAGES, OnDemandMigrationConfig, PathStyle, PolicyConfig, Provider, SourceConfig, SourceCredentials, TlsConfig, }; + use http::HeaderMap; use std::time::Duration; use tokio::io::{AsyncReadExt, AsyncWriteExt}; diff --git a/rustfs/src/on_demand_migration/native_http.rs b/rustfs/src/on_demand_migration/native_http.rs index ce3ff9907..8f2e345db 100644 --- a/rustfs/src/on_demand_migration/native_http.rs +++ b/rustfs/src/on_demand_migration/native_http.rs @@ -228,6 +228,7 @@ pub(super) async fn read_text(response: reqwest::Response, max_bytes: usize) -> /// Base64 digest (`Content-MD5`, `md5Hash`, `x-goog-hash`) as lowercase hex. /// `None` when the value is not a 16-byte digest, so a CRC32C never passes as /// an MD5. +#[cfg(any(test, feature = "gcs"))] pub(super) fn base64_md5_to_hex(value: &str) -> Option { let raw = base64_simd::STANDARD.decode_to_vec(value.trim().as_bytes()).ok()?; (raw.len() == 16).then(|| faster_hex::hex_string(&raw))