Skip to content

Commit

Permalink
Update Panic documentation and #[track_caller] (rust-random#1447)
Browse files Browse the repository at this point in the history
This is stuff I missed in rust-random#1442

Signed-off-by: Joe Richey <joerichey@google.com>
Co-authored-by: Diggory Hardy <git@dhardy.name>
  • Loading branch information
josephlr and dhardy authored May 8, 2024
1 parent 0217ad9 commit 7e5934e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/weighted_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ impl<W: Clone + PartialEq + PartialOrd + SampleUniform + SubAssign<W> + Weight>
impl<W: Clone + PartialEq + PartialOrd + SampleUniform + SubAssign<W> + Weight> Distribution<usize>
for WeightedTreeIndex<W>
{
#[track_caller]
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> usize {
self.try_sample(rng).unwrap()
}
Expand Down

0 comments on commit 7e5934e

Please sign in to comment.