Skip to content

Commit

Permalink
Add doc comment for helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Feb 9, 2024
1 parent e7d0d15 commit 6022968
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ pub(crate) fn round_down_to(n: usize, divisor: usize) -> usize {
n & !(divisor - 1)
}

/// Same as `round_down_to` but preserves pointer provenance.
#[inline]
pub(crate) fn round_mut_ptr_down_to(ptr: *mut u8, divisor: usize) -> *mut u8 {
debug_assert!(divisor > 0);
Expand Down

0 comments on commit 6022968

Please sign in to comment.