Skip to content

Commit 7e5934e

Browse files
josephlrdhardy
andauthored
Update Panic documentation and #[track_caller] (rust-random#1447)
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>
1 parent 0217ad9 commit 7e5934e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/weighted_tree.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ impl<W: Clone + PartialEq + PartialOrd + SampleUniform + SubAssign<W> + Weight>
290290
impl<W: Clone + PartialEq + PartialOrd + SampleUniform + SubAssign<W> + Weight> Distribution<usize>
291291
for WeightedTreeIndex<W>
292292
{
293+
#[track_caller]
293294
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> usize {
294295
self.try_sample(rng).unwrap()
295296
}

0 commit comments

Comments
 (0)