From 68a1fe20f28bd3340b219eddf49113d111386fb4 Mon Sep 17 00:00:00 2001 From: Yuchen Liang <70461588+yliang412@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:41:02 -0400 Subject: [PATCH] review: use doc comments to reference struct in safety comment Co-authored-by: Christian Schwarz --- pageserver/src/virtual_file/dio.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pageserver/src/virtual_file/dio.rs b/pageserver/src/virtual_file/dio.rs index f91fb456f6..f64dd99b2f 100644 --- a/pageserver/src/virtual_file/dio.rs +++ b/pageserver/src/virtual_file/dio.rs @@ -139,7 +139,7 @@ impl DerefMut for IoBufferMut { } } -// SAFETY: See [`IoBufferMut::advance_mut`] +/// SAFETY: See [`IoBufferMut::advance_mut`] unsafe impl bytes::BufMut for IoBufferMut { #[inline] fn remaining_mut(&self) -> usize { @@ -183,8 +183,8 @@ fn panic_advance(idx: usize, len: usize) -> ! { ); } -// Safety: [`IoBufferMut`] has exclusive ownership of the io buffer, -// and the location remains stable even if [`Self`] is moved. +/// Safety: [`IoBufferMut`] has exclusive ownership of the io buffer, +/// and the location remains stable even if [`Self`] is moved. unsafe impl tokio_epoll_uring::IoBuf for IoBufferMut { fn stable_ptr(&self) -> *const u8 { self.ptr