Skip to content

Commit

Permalink
Fix Send implementation for !Send types.
Browse files Browse the repository at this point in the history
  • Loading branch information
fereidani committed May 17, 2023
1 parent 770ae03 commit e55d07e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ pub(crate) struct ChannelInternal<T> {
pub(crate) send_count: u32,
}

// Safety: safety of channel internal movement is
unsafe impl<T> Send for ChannelInternal<T> {}
// Safety: It is safe to implement `Send` for `ChannelInternal<T>` if `T` is `Send`.
unsafe impl<T: Send> Send for ChannelInternal<T> {}

impl<T> ChannelInternal<T> {
/// Returns a channel internal with the required capacity
Expand Down

0 comments on commit e55d07e

Please sign in to comment.