Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jun 17, 2024
1 parent 017f6cb commit fe54f67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arrow-buffer/src/buffer/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ impl Buffer {
/// Returns the offset, in bytes, of `Self::ptr` to `Self::data`
///
/// self.ptr and self.data can be different after slicing or advancing the buffer.
///
/// # Safety
///
/// This function is unsafe as it uses unsafe function `offset_from`. Under certain
/// conditions, this function can cause undefined behavior. See the documentation of
/// `offset_from` for more information.
pub unsafe fn ptr_offset(&self) -> usize {
self.ptr.offset_from(self.data.ptr().as_ptr()) as usize
}
Expand Down

0 comments on commit fe54f67

Please sign in to comment.