From 2a5de77a247dc820dd082a6560635947763417fd Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Fri, 13 Sep 2024 08:24:53 +0100 Subject: [PATCH] Clippy: adjust doc first paragraph --- rand_distr/src/weighted_alias.rs | 7 ++++--- src/seq/index.rs | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/rand_distr/src/weighted_alias.rs b/rand_distr/src/weighted_alias.rs index 593219cafd..537060f388 100644 --- a/rand_distr/src/weighted_alias.rs +++ b/rand_distr/src/weighted_alias.rs @@ -275,9 +275,10 @@ where } } -/// Trait that must be implemented for weights, that are used with -/// [`WeightedAliasIndex`]. Currently no guarantees on the correctness of -/// [`WeightedAliasIndex`] are given for custom implementations of this trait. +/// Weight bound for [`WeightedAliasIndex`] +/// +/// Currently no guarantees on the correctness of [`WeightedAliasIndex`] are +/// given for custom implementations of this trait. pub trait AliasableWeight: Sized + Copy diff --git a/src/seq/index.rs b/src/seq/index.rs index 5bb1a7597f..e66b503988 100644 --- a/src/seq/index.rs +++ b/src/seq/index.rs @@ -282,10 +282,12 @@ where } } -/// Randomly sample exactly `amount` distinct indices from `0..length`, and -/// return them in an arbitrary order (there is no guarantee of shuffling or -/// ordering). The weights are to be provided by the input function `weights`, -/// which will be called once for each index. +/// Randomly sample exactly `amount` distinct indices from `0..length` +/// +/// Results are in arbitrary order (there is no guarantee of shuffling or +/// ordering). +/// +/// Function `weight` is called once for each index to provide weights. /// /// This method is used internally by the slice sampling methods, but it can /// sometimes be useful to have the indices themselves so this is provided as