Skip to content

Commit 438df57

Browse files
committed
Fix typo in offset_from documentation
1 parent dc8c868 commit 438df57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/ptr/const_ptr.rs

Lines changed: 1 addition & 1 deletion
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
///

core/src/ptr/mut_ptr.rs

Lines changed: 1 addition & 1 deletion
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)