mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-28 09:08:58 +00:00
refactor region parsing (#1981)
This commit is contained in:
+4
-4
@@ -163,11 +163,11 @@ async fn run(config: config::Config) -> Result<()> {
|
||||
// 1. Initialize global readiness tracker
|
||||
let readiness = Arc::new(GlobalReadiness::new());
|
||||
|
||||
if let Some(region) = &config.region {
|
||||
let region = region
|
||||
if let Some(region_str) = &config.region {
|
||||
region_str
|
||||
.parse()
|
||||
.map_err(|e| Error::other(format!("invalid region {}: {e}", region)))?;
|
||||
rustfs_ecstore::global::set_global_region(region);
|
||||
.map(rustfs_ecstore::global::set_global_region)
|
||||
.map_err(|e| Error::other(format!("invalid region '{}': {}", region_str, e)))?;
|
||||
}
|
||||
|
||||
let server_addr = parse_and_resolve_address(config.address.as_str()).map_err(Error::other)?;
|
||||
|
||||
Reference in New Issue
Block a user