Skip to content

Commit 2a5de77

Browse files
committed
Clippy: adjust doc first paragraph
1 parent e4c2daf commit 2a5de77

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

rand_distr/src/weighted_alias.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,10 @@ where
275275
}
276276
}
277277

278-
/// Trait that must be implemented for weights, that are used with
279-
/// [`WeightedAliasIndex`]. Currently no guarantees on the correctness of
280-
/// [`WeightedAliasIndex`] are given for custom implementations of this trait.
278+
/// Weight bound for [`WeightedAliasIndex`]
279+
///
280+
/// Currently no guarantees on the correctness of [`WeightedAliasIndex`] are
281+
/// given for custom implementations of this trait.
281282
pub trait AliasableWeight:
282283
Sized
283284
+ Copy

src/seq/index.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,12 @@ where
282282
}
283283
}
284284

285-
/// Randomly sample exactly `amount` distinct indices from `0..length`, and
286-
/// return them in an arbitrary order (there is no guarantee of shuffling or
287-
/// ordering). The weights are to be provided by the input function `weights`,
288-
/// which will be called once for each index.
285+
/// Randomly sample exactly `amount` distinct indices from `0..length`
286+
///
287+
/// Results are in arbitrary order (there is no guarantee of shuffling or
288+
/// ordering).
289+
///
290+
/// Function `weight` is called once for each index to provide weights.
289291
///
290292
/// This method is used internally by the slice sampling methods, but it can
291293
/// sometimes be useful to have the indices themselves so this is provided as

0 commit comments

Comments
 (0)