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 c8e43a8cf refactor(core): MaybeSend does not need to be unsafe (#5338)
c8e43a8cf is described below
commit c8e43a8cfdbadbb82ae4bf0b7cddf77491034229
Author: 张炎泼 <[email protected]>
AuthorDate: Mon Nov 18 13:21:16 2024 +0800
refactor(core): MaybeSend does not need to be unsafe (#5338)
---
core/src/raw/futures_util.rs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/core/src/raw/futures_util.rs b/core/src/raw/futures_util.rs
index 3abf645b1..3d182bf49 100644
--- a/core/src/raw/futures_util.rs
+++ b/core/src/raw/futures_util.rs
@@ -49,17 +49,17 @@ pub type BoxedStaticFuture<T> =
futures::future::LocalBoxFuture<'static, T>;
///
/// # Safety
///
-/// MaybeSend equivalent to `Send` on non-wasm32 target. And it's empty
-/// on wasm32 target.
+/// [`MaybeSend`] is equivalent to `Send` on non-wasm32 target.
+/// And it's empty trait on wasm32 target to indicate that a type is not
`Send`.
#[cfg(not(target_arch = "wasm32"))]
-pub unsafe trait MaybeSend: Send {}
+pub trait MaybeSend: Send {}
#[cfg(target_arch = "wasm32")]
-pub unsafe trait MaybeSend {}
+pub trait MaybeSend {}
#[cfg(not(target_arch = "wasm32"))]
-unsafe impl<T: Send> MaybeSend for T {}
+impl<T: Send> MaybeSend for T {}
#[cfg(target_arch = "wasm32")]
-unsafe impl<T> MaybeSend for T {}
+impl<T> MaybeSend for T {}
/// ConcurrentTasks is used to execute tasks concurrently.
///