diff options
| author | bors <bors@rust-lang.org> | 2014-01-17 20:36:47 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-17 20:36:47 -0800 |
| commit | c58d2bacb78ed0d2b9c0c0909e56f390b525aabd (patch) | |
| tree | cfdb77d3b7fc5febbbe2e7cca33a4d1bb11efcd1 /src/libstd/sync | |
| parent | f4498c71e21308f6657d0150d5f473835e4b436f (diff) | |
| parent | ed7e576d9cf807169b17b5a4c572e874e38681cf (diff) | |
| download | rust-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.rs | 4 |
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 |
