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 35b002ab2 chore(core): avoid inefficient to_string (#6956)
35b002ab2 is described below

commit 35b002ab2bb44a1d396aa520a0dac9bb8eaa9835
Author: TennyZhuang <[email protected]>
AuthorDate: Mon Dec 8 23:58:15 2025 +0800

    chore(core): avoid inefficient to_string (#6956)
    
    Co-authored-by: Example User <[email protected]>
---
 core/core/src/raw/http_util/multipart.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/core/src/raw/http_util/multipart.rs 
b/core/core/src/raw/http_util/multipart.rs
index 72a40e1a3..0f47f9416 100644
--- a/core/core/src/raw/http_util/multipart.rs
+++ b/core/core/src/raw/http_util/multipart.rs
@@ -470,7 +470,7 @@ impl Part for MixedPart {
         let parts = http_response.split("\r\n\r\n").collect::<Vec<&str>>();
         let headers_content = parts[0];
         let body_content = parts.get(1).unwrap_or(&"");
-        let body_bytes = Buffer::from(body_content.to_string());
+        let body_bytes = Buffer::from(body_content.as_bytes().to_vec());
 
         let status_line = headers_content.lines().next().unwrap_or("");
         let status_code = status_line

Reply via email to