about summary refs log tree commit diff
path: root/src/libstd/rand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/rand.rs')
-rw-r--r--src/libstd/rand.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rand.rs b/src/libstd/rand.rs
index b7d72c11ff7..4ef524d7715 100644
--- a/src/libstd/rand.rs
+++ b/src/libstd/rand.rs
@@ -533,7 +533,7 @@ impl<R: Rng> RngUtil for R {
 
     /// Choose an item randomly, failing if values is empty
     fn choose<T:Clone>(&mut self, values: &[T]) -> T {
-        self.choose_option(values).get()
+        self.choose_option(values).unwrap()
     }
 
     /// Choose Some(item) randomly, returning None if values is empty
@@ -549,7 +549,7 @@ impl<R: Rng> RngUtil for R {
      * the weights is 0
      */
     fn choose_weighted<T:Clone>(&mut self, v: &[Weighted<T>]) -> T {
-        self.choose_weighted_option(v).get()
+        self.choose_weighted_option(v).unwrap()
     }
 
     /**