Skip to content

Commit c8e43a8

Browse files
authored
refactor(core): MaybeSend does not need to be unsafe (#5338)
1 parent d7eb774 commit c8e43a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/raw/futures_util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ pub type BoxedStaticFuture<T> = futures::future::LocalBoxFuture<'static, T>;
4949
///
5050
/// # Safety
5151
///
52-
/// MaybeSend equivalent to `Send` on non-wasm32 target. And it's empty
53-
/// on wasm32 target.
52+
/// [`MaybeSend`] is equivalent to `Send` on non-wasm32 target.
53+
/// And it's empty trait on wasm32 target to indicate that a type is not `Send`.
5454
#[cfg(not(target_arch = "wasm32"))]
55-
pub unsafe trait MaybeSend: Send {}
55+
pub trait MaybeSend: Send {}
5656
#[cfg(target_arch = "wasm32")]
57-
pub unsafe trait MaybeSend {}
57+
pub trait MaybeSend {}
5858

5959
#[cfg(not(target_arch = "wasm32"))]
60-
unsafe impl<T: Send> MaybeSend for T {}
60+
impl<T: Send> MaybeSend for T {}
6161
#[cfg(target_arch = "wasm32")]
62-
unsafe impl<T> MaybeSend for T {}
62+
impl<T> MaybeSend for T {}
6363

6464
/// ConcurrentTasks is used to execute tasks concurrently.
6565
///

0 commit comments

Comments
 (0)