about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-17 20:36:47 -0800
committerbors <bors@rust-lang.org>2014-01-17 20:36:47 -0800
commitc58d2bacb78ed0d2b9c0c0909e56f390b525aabd (patch)
treecfdb77d3b7fc5febbbe2e7cca33a4d1bb11efcd1 /src/libstd/sync
parentf4498c71e21308f6657d0150d5f473835e4b436f (diff)
parented7e576d9cf807169b17b5a4c572e874e38681cf (diff)
downloadrust-c58d2bacb78ed0d2b9c0c0909e56f390b525aabd.tar.gz
rust-c58d2bacb78ed0d2b9c0c0909e56f390b525aabd.zip
auto merge of #11503 : FlaPer87/rust/master, r=huonw
The patch adds the missing pow method for all the implementations of the
Integer trait. This is a small addition that will most likely be
improved by the work happening in #10387.

Fixes #11499
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mpmc_bounded_queue.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sync/mpmc_bounded_queue.rs b/src/libstd/sync/mpmc_bounded_queue.rs
index 18d17eed885..bf02bf204a5 100644
--- a/src/libstd/sync/mpmc_bounded_queue.rs
+++ b/src/libstd/sync/mpmc_bounded_queue.rs
@@ -31,10 +31,10 @@
 
 use clone::Clone;
 use kinds::Send;
-use num::{Real, Round};
 use option::{Option, Some, None};
 use sync::arc::UnsafeArc;
 use sync::atomics::{AtomicUint,Relaxed,Release,Acquire};
+use uint;
 use vec;
 
 struct Node<T> {
@@ -64,7 +64,7 @@ impl<T: Send> State<T> {
                 2u
             } else {
                 // use next power of 2 as capacity
-                2f64.pow(&((capacity as f64).log2().ceil())) as uint
+                uint::next_power_of_two(capacity)
             }
         } else {
             capacity