From 920705417c33315492f43d6e248d56b610623226 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Thu, 30 Jul 2026 08:53:16 +0800 Subject: [PATCH] refactor(ecstore): correct bucket config static names (#5458) refactor(ecstore): fix bucket config static names --- crates/ecstore/src/store/bucket.rs | 7 ++++--- crates/ecstore/src/store/mod.rs | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/ecstore/src/store/bucket.rs b/crates/ecstore/src/store/bucket.rs index 19408114a..46c9e7aa0 100644 --- a/crates/ecstore/src/store/bucket.rs +++ b/crates/ecstore/src/store/bucket.rs @@ -310,12 +310,13 @@ impl ECStore { meta.set_created(opts.created_at); if opts.lock_enabled { - meta.object_lock_config_xml = crate::bucket::utils::serialize::(&enableObjcetLockConfig)?; - meta.versioning_config_xml = crate::bucket::utils::serialize::(&enableVersioningConfig)?; + meta.object_lock_config_xml = + crate::bucket::utils::serialize::(&ENABLED_OBJECT_LOCK_CONFIG)?; + meta.versioning_config_xml = crate::bucket::utils::serialize::(&ENABLED_VERSIONING_CONFIG)?; } if opts.versioning_enabled { - meta.versioning_config_xml = crate::bucket::utils::serialize::(&enableVersioningConfig)?; + meta.versioning_config_xml = crate::bucket::utils::serialize::(&ENABLED_VERSIONING_CONFIG)?; } await_bucket_namespace_operation( diff --git a/crates/ecstore/src/store/mod.rs b/crates/ecstore/src/store/mod.rs index 4c9ea3039..6ddb6d5bb 100644 --- a/crates/ecstore/src/store/mod.rs +++ b/crates/ecstore/src/store/mod.rs @@ -428,11 +428,11 @@ impl ECStore { } lazy_static! { - static ref enableObjcetLockConfig: ObjectLockConfiguration = ObjectLockConfiguration { + static ref ENABLED_OBJECT_LOCK_CONFIG: ObjectLockConfiguration = ObjectLockConfiguration { object_lock_enabled: Some(ObjectLockEnabled::from_static(ObjectLockEnabled::ENABLED)), ..Default::default() }; - static ref enableVersioningConfig: VersioningConfiguration = VersioningConfiguration { + static ref ENABLED_VERSIONING_CONFIG: VersioningConfiguration = VersioningConfiguration { status: Some(BucketVersioningStatus::from_static(BucketVersioningStatus::ENABLED)), ..Default::default() };