From a310c3183ce447b7d833d03267ca8caa72b10625 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Sun, 1 Dec 2024 13:56:10 +0000 Subject: [PATCH] Docs --- arrow-buffer/src/buffer/mutable.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arrow-buffer/src/buffer/mutable.rs b/arrow-buffer/src/buffer/mutable.rs index 8a7be9c25fe..d3436cda0e3 100644 --- a/arrow-buffer/src/buffer/mutable.rs +++ b/arrow-buffer/src/buffer/mutable.rs @@ -467,10 +467,14 @@ impl MutableBuffer { } } + +/// Creates a non-null pointer with alignment of [`ALIGNMENT`] +/// +/// This is similar to [`NonNull::dangling`] #[inline] pub(crate) fn dangling_ptr() -> NonNull { - // SAFETY: ALIGNMENT is a non-zero usize which is then casted - // to a *mut T. Therefore, `ptr` is not null and the conditions for + // SAFETY: ALIGNMENT is a non-zero usize which is then cast + // to a *mut u8. Therefore, `ptr` is not null and the conditions for // calling new_unchecked() are respected. #[cfg(miri)] {