File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,9 @@ pub trait SliceRandom {
199
199
/// If all of the weights are equal, even if they are all zero, each element has
200
200
/// an equal likelihood of being selected.
201
201
///
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.
206
205
///
207
206
/// # Example
208
207
///
You can’t perform that action at this time.
0 commit comments