Skip to content

Commit 34154f0

Browse files
committed
clarify Err in sample_iter
1 parent 3a4015a commit 34154f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/seq.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ use std::collections::hash_map::HashMap;
1717
///
1818
/// The following can be returned:
1919
/// - `Ok`: `Vec` of `amount` non-repeating randomly sampled elements. The order is not random.
20-
/// - `Err`: `Vec` of *less than* `amount` elements in sequential order. This is considered an
21-
/// error since exactly `amount` elements is typically expected.
20+
/// - `Err`: `Vec` of all the elements from `iterable` in sequential order. This happens when the
21+
/// length of `iterable` was less than `amount`. This is considered an error since exactly `amount`
22+
/// elements is typically expected.
2223
///
2324
/// This implementation uses `O(len(iterable))` time and `O(amount)` memory.
2425
///

0 commit comments

Comments
 (0)