Fix typo in offset_from documentation

This commit is contained in:
Adrian Palacios 2022-05-02 14:41:21 +00:00
parent 5428983286
commit 9b36a47831
2 changed files with 2 additions and 2 deletions

View File

@ -518,7 +518,7 @@ impl<T: ?Sized> *const T {
}
/// Calculates the distance between two pointers. The returned value is in
/// units of T: the distance in bytes is divided by `mem::size_of::<T>()`.
/// units of T: the distance in bytes divided by `mem::size_of::<T>()`.
///
/// This function is the inverse of [`offset`].
///

View File

@ -696,7 +696,7 @@ impl<T: ?Sized> *mut T {
}
/// Calculates the distance between two pointers. The returned value is in
/// units of T: the distance in bytes is divided by `mem::size_of::<T>()`.
/// units of T: the distance in bytes divided by `mem::size_of::<T>()`.
///
/// This function is the inverse of [`offset`].
///