fix(protocols): resolve clippy type_complexity in swift expiration worker tests (#4393)

fix(protocols): factor swift expiration mock result type into alias

The swift feature clippy matrix on main fails with clippy::type_complexity on the MockExpirationObjectBackend test struct introduced with the expiration worker tests, blocking CI for every open PR. Introduce a MetadataResult type alias in the test module; no behavior change.

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-07-08 03:29:46 +08:00
committed by GitHub
parent 7efacbdf95
commit 86940a9452
@@ -656,9 +656,11 @@ mod tests {
use std::collections::VecDeque;
use std::sync::Mutex;
type MetadataResult = SwiftResult<Option<HashMap<String, String>>>;
#[derive(Default)]
struct MockExpirationObjectBackend {
metadata_results: Mutex<VecDeque<SwiftResult<Option<HashMap<String, String>>>>>,
metadata_results: Mutex<VecDeque<MetadataResult>>,
delete_results: Mutex<VecDeque<SwiftResult<()>>>,
deleted_objects: Mutex<Vec<(String, String, String)>>,
}