Skip to content

Commit 9b36a47

Browse files
committed
Fix typo in offset_from documentation
1 parent 5428983 commit 9b36a47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/ptr/const_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl<T: ?Sized> *const T {
518518
}
519519

520520
/// Calculates the distance between two pointers. The returned value is in
521-
/// units of T: the distance in bytes is divided by `mem::size_of::<T>()`.
521+
/// units of T: the distance in bytes divided by `mem::size_of::<T>()`.
522522
///
523523
/// This function is the inverse of [`offset`].
524524
///

library/core/src/ptr/mut_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ impl<T: ?Sized> *mut T {
696696
}
697697

698698
/// Calculates the distance between two pointers. The returned value is in
699-
/// units of T: the distance in bytes is divided by `mem::size_of::<T>()`.
699+
/// units of T: the distance in bytes divided by `mem::size_of::<T>()`.
700700
///
701701
/// This function is the inverse of [`offset`].
702702
///

0 commit comments

Comments
 (0)