This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new d3bd6eb63 fix(services/azblob): Remove let-chain for Rust 1.85 support
(#7336)
d3bd6eb63 is described below
commit d3bd6eb633244c120d90502c17650c0365241245
Author: Matt Mastracci <[email protected]>
AuthorDate: Mon Mar 30 23:10:57 2026 -0600
fix(services/azblob): Remove let-chain for Rust 1.85 support (#7336)
fix(services/azblob): Remove let-chain for Rust 1.85
---
core/services/azblob/src/error.rs | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/core/services/azblob/src/error.rs
b/core/services/azblob/src/error.rs
index 965dfb0cb..1e28e8350 100644
--- a/core/services/azblob/src/error.rs
+++ b/core/services/azblob/src/error.rs
@@ -82,17 +82,20 @@ pub(super) fn parse_error(resp: Response<Buffer>) -> Error {
};
// If there is no body here, fill with error code.
- if message.is_empty()
- && let Some(v) = parts.headers.get("x-ms-error-code")
- && let Ok(code) = v.to_str()
- {
- message = format!(
- "{:?}",
- AzblobError {
- code: code.to_string(),
- ..Default::default()
- }
- )
+ if message.is_empty() {
+ if let Some(code) = parts
+ .headers
+ .get("x-ms-error-code")
+ .and_then(|v| v.to_str().ok())
+ {
+ message = format!(
+ "{:?}",
+ AzblobError {
+ code: code.to_string(),
+ ..Default::default()
+ }
+ );
+ }
}
let mut err = Error::new(kind, &message);