Skip to content

Commit

Permalink
clarify Err in sample_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
vitiral committed Nov 27, 2017
1 parent 3a4015a commit 70ffaaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ use std::collections::hash_map::HashMap;
///
/// The following can be returned:
/// - `Ok`: `Vec` of `amount` non-repeating randomly sampled elements. The order is not random.
/// - `Err`: `Vec` of *less than* `amount` elements in sequential order. This is considered an
/// error since exactly `amount` elements is typically expected.
/// - `Err`: `Vec` of all the elements from `iterable` in sequential order. This happens when the
/// length of `iterable` was less than `amount`. This is considered an error since exactly
/// `amount` elements is typically expected.
///
/// This implementation uses `O(len(iterable))` time and `O(amount)` memory.
///
Expand Down

0 comments on commit 70ffaaa

Please sign in to comment.