Skip to content

Commit 4c866d8

Browse files
committed
docs: ArcHandle::as_inner safety
1 parent e3cc007 commit 4c866d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libdd-profiling-ffi/src/arc_handle.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ impl<T> ArcHandle<T> {
5050

5151
#[inline]
5252
pub fn as_inner(&self) -> Result<&T, EmptyHandleError> {
53+
// SAFETY: If non-null, self.0 was created from Arc and remains valid,
54+
// at least as long as we can trust the C side to not do insane things.
5355
unsafe { self.0.as_ref() }.ok_or(EmptyHandleError)
5456
}
5557

0 commit comments

Comments
 (0)