Skip to content

Commit 387dd64

Browse files
authored
fix outdated choose_multiple_weighted docs (#1237)
1 parent 23f8b29 commit 387dd64

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/seq/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ pub trait SliceRandom {
199199
/// If all of the weights are equal, even if they are all zero, each element has
200200
/// an equal likelihood of being selected.
201201
///
202-
/// The complexity of this method depends on the feature `partition_at_index`.
203-
/// If the feature is enabled, then for slices of length `n`, the complexity
204-
/// is `O(n)` space and `O(n)` time. Otherwise, the complexity is `O(n)` space and
205-
/// `O(n * log amount)` time.
202+
/// This implementation uses `O(length + amount)` space and `O(length)` time
203+
/// if the "nightly" feature is enabled, or `O(length)` space and
204+
/// `O(length + amount * log length)` time otherwise.
206205
///
207206
/// # Example
208207
///

0 commit comments

Comments
 (0)