mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
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:
@@ -656,9 +656,11 @@ mod tests {
|
|||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
||||||
|
type MetadataResult = SwiftResult<Option<HashMap<String, String>>>;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct MockExpirationObjectBackend {
|
struct MockExpirationObjectBackend {
|
||||||
metadata_results: Mutex<VecDeque<SwiftResult<Option<HashMap<String, String>>>>>,
|
metadata_results: Mutex<VecDeque<MetadataResult>>,
|
||||||
delete_results: Mutex<VecDeque<SwiftResult<()>>>,
|
delete_results: Mutex<VecDeque<SwiftResult<()>>>,
|
||||||
deleted_objects: Mutex<Vec<(String, String, String)>>,
|
deleted_objects: Mutex<Vec<(String, String, String)>>,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user