mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-07 04:25:54 +00:00
fix(list): satisfy clippy in the source listing merge (#7117)
This commit is contained in:
@@ -336,7 +336,7 @@ async fn fetch_source_page(
|
|||||||
delimiter: params.delimiter.as_deref(),
|
delimiter: params.delimiter.as_deref(),
|
||||||
// S3 ignores start-after once a continuation token is present, so
|
// S3 ignores start-after once a continuation token is present, so
|
||||||
// the client's own start-after only applies to the first page.
|
// the client's own start-after only applies to the first page.
|
||||||
start_after: token.is_none().then(|| params.start_after_for_query.as_deref()).flatten(),
|
start_after: token.is_none().then_some(params.start_after_for_query.as_deref()).flatten(),
|
||||||
continuation_token: token,
|
continuation_token: token,
|
||||||
max_keys: params.max_keys,
|
max_keys: params.max_keys,
|
||||||
},
|
},
|
||||||
@@ -363,9 +363,11 @@ async fn fetch_source_page(
|
|||||||
SourceListPlan::Folded { common_prefix, .. } => {
|
SourceListPlan::Folded { common_prefix, .. } => {
|
||||||
let exists = !page.objects.is_empty() || !page.common_prefixes.is_empty();
|
let exists = !page.objects.is_empty() || !page.common_prefixes.is_empty();
|
||||||
Ok((
|
Ok((
|
||||||
exists
|
if exists {
|
||||||
.then(|| vec![SideEntry::Prefix(common_prefix.clone())])
|
vec![SideEntry::Prefix(common_prefix.clone())]
|
||||||
.unwrap_or_default(),
|
} else {
|
||||||
|
Vec::new()
|
||||||
|
},
|
||||||
false,
|
false,
|
||||||
None,
|
None,
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user