diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-05-20 20:44:45 -0700 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-05-20 20:44:45 -0700 |
| commit | b8270c8db28edd56ace60141c36a9e6aa380b9da (patch) | |
| tree | 600c28b85b48897c358419587321611f297273b1 /src/libflate/lib.rs | |
| parent | e546452727379f701f2104eb826141a29d4b39fd (diff) | |
| download | rust-b8270c8db28edd56ace60141c36a9e6aa380b9da.tar.gz rust-b8270c8db28edd56ace60141c36a9e6aa380b9da.zip | |
Remove Rng.choose(), rename Rng.choose_option() to .choose()
Rng.choose() is used so rarely that it doesn't necessitate having two methods, especially since the failing, non-option variant also requires Clone. [breaking-change]
Diffstat (limited to 'src/libflate/lib.rs')
| -rw-r--r-- | src/libflate/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index 03050794d21..76d803cdacc 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -125,7 +125,7 @@ mod tests { for _ in range(0, 20) { let mut input = vec![]; for _ in range(0, 2000) { - input.push_all(r.choose(words.as_slice()).as_slice()); + input.push_all(r.choose(words.as_slice()).unwrap().as_slice()); } debug!("de/inflate of {} bytes of random word-sequences", input.len()); |
