Skip to content

Commit

Permalink
Add type annotations to transmute in ActorRef
Browse files Browse the repository at this point in the history
Fixes a Clippy warning.
  • Loading branch information
Thomasdezeeuw committed Apr 6, 2024
1 parent 94be638 commit 72e3a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actor_ref/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ impl<M> ActorRef<M> {
Msg: 'static,
{
if TypeId::of::<ActorRef<M>>() == TypeId::of::<ActorRef<Msg>>() {
// Safety: If `M` == `Msg`, then the following `transmute` is a
// SAFETY: If `M` == `Msg`, then the following `transmute` is a
// no-op and thus safe.
unsafe { std::mem::transmute(self) }
unsafe { std::mem::transmute::<ActorRef<M>, ActorRef<Msg>>(self) }
} else {
ActorRef {
kind: ActorRefKind::Mapped(Arc::new(self)),
Expand Down

0 comments on commit 72e3a6e

Please sign in to comment.