From ddcbe40cb0224f357ab3a50dc679e88793ecfd61 Mon Sep 17 00:00:00 2001 From: "Andre B. Reis" Date: Wed, 27 Feb 2019 18:02:49 +0000 Subject: [PATCH] Fix docs for choose_multiple_fills --- src/seq/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/seq/mod.rs b/src/seq/mod.rs index eff8a881..cd0412f8 100644 --- a/src/seq/mod.rs +++ b/src/seq/mod.rs @@ -238,16 +238,16 @@ pub trait IteratorRandom: Iterator + Sized { } } - /// Collects `amount` values at random from the iterator into a supplied - /// buffer. + /// Collects values at random from the iterator into a supplied buffer + /// until that buffer is filled. /// /// Although the elements are selected randomly, the order of elements in /// the buffer is neither stable nor fully random. If random ordering is /// desired, shuffle the result. /// - /// Returns the number of elements added to the buffer. This equals `amount` - /// unless the iterator contains insufficient elements, in which case this - /// equals the number of elements available. + /// Returns the number of elements added to the buffer. This equals the length + /// of the buffer unless the iterator contains insufficient elements, in which + /// case this equals the number of elements available. /// /// Complexity is `O(n)` where `n` is the length of the iterator. fn choose_multiple_fill(mut self, rng: &mut R, buf: &mut [Self::Item]) -> usize