Skip to content

Commit

Permalink
Ignore non_send_fields_in_send_ty for ActorRef
Browse files Browse the repository at this point in the history
And for related types. We know the underlying type is Send, so so it the
ActorRef.
  • Loading branch information
Thomasdezeeuw committed Oct 9, 2021
1 parent 43e77f5 commit e0960e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actor_ref/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ enum ActorRefKind<M> {
// variant is a boxed version of `Local` so is that variant. This makes the
// entire `ActorRefKind` `Send` and `Sync`, as long as `M` is `Send` (as we
// could be sending the message across thread bounds).
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<M: Send> Send for ActorRefKind<M> {}
unsafe impl<M: Send> Sync for ActorRefKind<M> {}

Expand Down Expand Up @@ -463,6 +464,7 @@ enum SendValueKind<'r, M> {
// variant is a boxed version of `Local` so is that variant. This makes the
// entire `SendValueKind` `Send` and `Sync`, as long as `M` is `Send` (as we
// could be sending the message across thread bounds).
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<'r, M: Send> Send for SendValueKind<'r, M> {}
unsafe impl<'r, M: Send> Sync for SendValueKind<'r, M> {}

Expand Down Expand Up @@ -525,6 +527,7 @@ enum JoinKind<'r, M> {
// variant is a boxed version of `Local` so is that variant. This makes the
// entire `JoinKind` `Send` and `Sync`, as long as `M` is `Send` (as we could be
// sending the message across thread bounds).
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<'r, M: Send> Send for JoinKind<'r, M> {}
unsafe impl<'r, M: Send> Sync for JoinKind<'r, M> {}

Expand Down

0 comments on commit e0960e6

Please sign in to comment.