fix: replace unwrap() with expect() in remaining files (#729 batch 12) (#3992)

This commit is contained in:
Zhengchao An
2026-06-28 11:45:03 +08:00
committed by GitHub
parent 1f8a5bc095
commit f0ab812213
9 changed files with 108 additions and 108 deletions
+3 -3
View File
@@ -208,7 +208,7 @@ impl Operation for KmsStatusHandler {
let data = serde_json::to_vec(&response).map_err(|e| s3_error!(InternalError, "failed to serialize response: {}", e))?;
let mut headers = HeaderMap::new();
headers.insert(CONTENT_TYPE, "application/json".parse().unwrap());
headers.insert(CONTENT_TYPE, "application/json".parse().expect("operation should succeed"));
Ok(S3Response::with_headers((StatusCode::OK, Body::from(data)), headers))
}
@@ -257,7 +257,7 @@ impl Operation for KmsConfigHandler {
let data = serde_json::to_vec(&response).map_err(|e| s3_error!(InternalError, "failed to serialize response: {}", e))?;
let mut headers = HeaderMap::new();
headers.insert(CONTENT_TYPE, "application/json".parse().unwrap());
headers.insert(CONTENT_TYPE, "application/json".parse().expect("operation should succeed"));
Ok(S3Response::with_headers((StatusCode::OK, Body::from(data)), headers))
}
@@ -302,7 +302,7 @@ impl Operation for KmsClearCacheHandler {
serde_json::to_vec(&response).map_err(|e| s3_error!(InternalError, "failed to serialize response: {}", e))?;
let mut headers = HeaderMap::new();
headers.insert(CONTENT_TYPE, "application/json".parse().unwrap());
headers.insert(CONTENT_TYPE, "application/json".parse().expect("operation should succeed"));
Ok(S3Response::with_headers((StatusCode::OK, Body::from(data)), headers))
}