Skip to content

Commit

Permalink
Fix typo in offset_from documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adpaco-aws committed May 2, 2022
1 parent 5428983 commit 9b36a47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
///
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
///
Expand Down

0 comments on commit 9b36a47

Please sign in to comment.