Skip to content

Commit fe54f67

Browse files
committed
Fix clippy
1 parent 017f6cb commit fe54f67

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arrow-buffer/src/buffer/immutable.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ impl Buffer {
7474
/// Returns the offset, in bytes, of `Self::ptr` to `Self::data`
7575
///
7676
/// self.ptr and self.data can be different after slicing or advancing the buffer.
77+
///
78+
/// # Safety
79+
///
80+
/// This function is unsafe as it uses unsafe function `offset_from`. Under certain
81+
/// conditions, this function can cause undefined behavior. See the documentation of
82+
/// `offset_from` for more information.
7783
pub unsafe fn ptr_offset(&self) -> usize {
7884
self.ptr.offset_from(self.data.ptr().as_ptr()) as usize
7985
}

0 commit comments

Comments
 (0)