Merge branch 'main' of github.com:rustfs/rustfs into houseme/get-small-file-optimization

* 'main' of github.com:rustfs/rustfs:
  fix(ecstore): replace unsafe k.unwrap() in bucket_target_sys (#729) (#3982)
This commit is contained in:
houseme
2026-06-28 10:45:19 +08:00
+20 -15
View File
@@ -1525,9 +1525,10 @@ impl TargetClient {
.customize()
.map_request(move |mut req| {
for (k, v) in headers.clone().into_iter() {
let key_str = k.unwrap().as_str().to_string();
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
if let Some(key_str) = k.map(|k| k.as_str().to_string()) {
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
}
}
Result::<_, aws_smithy_types::error::operation::BuildError>::Ok(req)
@@ -1586,9 +1587,10 @@ impl TargetClient {
.customize()
.map_request(move |mut req| {
for (k, v) in headers.clone().into_iter() {
let key_str = k.unwrap().as_str().to_string();
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
if let Some(key_str) = k.map(|k| k.as_str().to_string()) {
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
}
}
Result::<_, aws_smithy_types::error::operation::BuildError>::Ok(req)
})
@@ -1625,9 +1627,10 @@ impl TargetClient {
.customize()
.map_request(move |mut req| {
for (k, v) in headers.clone().into_iter() {
let key_str = k.unwrap().as_str().to_string();
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
if let Some(key_str) = k.map(|k| k.as_str().to_string()) {
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
}
}
Result::<_, aws_smithy_types::error::operation::BuildError>::Ok(req)
})
@@ -1661,9 +1664,10 @@ impl TargetClient {
.customize()
.map_request(move |mut req| {
for (k, v) in headers.clone().into_iter() {
let key_str = k.unwrap().as_str().to_string();
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
if let Some(key_str) = k.map(|k| k.as_str().to_string()) {
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
}
}
Result::<_, aws_smithy_types::error::operation::BuildError>::Ok(req)
})
@@ -1694,9 +1698,10 @@ impl TargetClient {
.customize()
.map_request(move |mut req| {
for (k, v) in headers.clone().into_iter() {
let key_str = k.unwrap().as_str().to_string();
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
if let Some(key_str) = k.map(|k| k.as_str().to_string()) {
let value_str = v.to_str().unwrap_or("").to_string();
req.headers_mut().insert(key_str, value_str);
}
}
Result::<_, aws_smithy_types::error::operation::BuildError>::Ok(req)
})