You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2024/04/09 06:21:34 UTC
(opendal) branch main updated: feat: ?Send async trait for HttpBackend when the target is wasm32 (#4444)
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 c969dabf2c feat: ?Send async trait for HttpBackend when the target is wasm32 (#4444)
c969dabf2c is described below
commit c969dabf2ca0b43ec5ee4c3e291093626f7a96f2
Author: Ruihang Xia <wa...@gmail.com>
AuthorDate: Tue Apr 9 15:21:28 2024 +0900
feat: ?Send async trait for HttpBackend when the target is wasm32 (#4444)
Signed-off-by: Ruihang Xia <wa...@gmail.com>
---
core/src/services/http/backend.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/src/services/http/backend.rs b/core/src/services/http/backend.rs
index cd8c0c6e40..5028d99b73 100644
--- a/core/src/services/http/backend.rs
+++ b/core/src/services/http/backend.rs
@@ -222,7 +222,8 @@ impl Debug for HttpBackend {
}
}
-#[async_trait]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
impl Accessor for HttpBackend {
type Reader = HttpReader;
type Writer = ();