Skip to content

Commit

Permalink
Rename Slice::choices() -> Slice::num_choices()
Browse files Browse the repository at this point in the history
Signed-off-by: Justus Fluegel <[email protected]>
  • Loading branch information
JustusFluegel committed Mar 3, 2024
1 parent ebeaeb3 commit a609bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/distributions/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<'a, T> Slice<'a, T> {
}

/// Returns the count of choices in this distribution
pub fn choices(&self) -> NonZeroUsize {
pub fn num_choices(&self) -> NonZeroUsize {
// Safety: at construction time, it was ensured that the slice was
// non-empty, as such the length can never be 0.
unsafe { NonZeroUsize::new_unchecked(self.slice.len()) }
Expand Down

0 comments on commit a609bd4

Please sign in to comment.