Skip to content

Commit c25366b

Browse files
committed
added safety comment
1 parent 739b8ab commit c25366b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fyrox-core/src/pool/handle.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ where
566566
T: ObjectOrVariant<B>,
567567
{
568568
fn to_base(self) -> Vec<Handle<B>> {
569+
// SAFETY: The handle does not store the data of its inner type, so Handle<A> is the
570+
// equivalent of Handle<B>, thus the same is applied to Vec<Handle<..>>.
569571
unsafe { std::mem::transmute(self) }
570572
}
571573
}

0 commit comments

Comments
 (0)