mirror of
https://github.com/rustfs/rustfs.git
synced 2026-11-19 14:32:28 +00:00
chore(rustfs): remove redundant S3 error conversions flagged by Clippy
This commit is contained in:
@@ -283,7 +283,7 @@ impl DefaultObjectUsecase {
|
||||
let expected_incarnation = match odm_read_generation(req, bucket) {
|
||||
Ok(Some(incarnation)) => incarnation,
|
||||
Ok(None) => return None,
|
||||
Err(err) => return Some(Err(err.into())),
|
||||
Err(err) => return Some(Err(err)),
|
||||
};
|
||||
match store.bucket_incarnation_id(bucket).await {
|
||||
Ok(current) if current == expected_incarnation => {}
|
||||
|
||||
@@ -83,7 +83,7 @@ fn replication_deny_edit_error() -> S3Error {
|
||||
pub(crate) fn prepare_replication_config_edit<R: AuthorizationRequest + ?Sized>(
|
||||
request: &R,
|
||||
) -> impl Future<Output = S3Result<(HashSet<String>, OperatorRuleContract)>> + Send + use<R> {
|
||||
let is_owner = req_info_ref(request).map(|info| info.is_owner).map_err(S3Error::from);
|
||||
let is_owner = req_info_ref(request).map(|info| info.is_owner);
|
||||
async move {
|
||||
if !is_owner? && site_replication_gate_enabled().await? {
|
||||
return Err(replication_deny_edit_error());
|
||||
|
||||
Reference in New Issue
Block a user