use super::{NonNull, PackedEndpointHandle};
impl<'cfg, T> crate::runtime::SessionKit<'cfg, T>
where
T: crate::transport::Transport + 'cfg,
{
pub(super) unsafe fn drop_public_endpoint_raw<const ROLE: u8>(
ptr: NonNull<()>,
handle: PackedEndpointHandle,
) {
let Some(endpoint) = (unsafe {
Self::public_endpoint_ptr_from_header::<'cfg, ROLE>(ptr, handle)
}) else {
return;
};
unsafe {
core::ptr::drop_in_place(endpoint);
}
}
}