about summary refs log tree commit diff
path: root/src/libstd/sync/mpmc_bounded_queue.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-01-30 16:35:17 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-02-01 13:02:53 +1100
commit9a3583f06d7086c8eca70ae5770ecce1a74680be (patch)
treec1d228c64e7f4d547292b7fb94f5b7a0a8fe4633 /src/libstd/sync/mpmc_bounded_queue.rs
parent535e806841e1eca7adb9f41796001848f6859637 (diff)
downloadrust-9a3583f06d7086c8eca70ae5770ecce1a74680be.tar.gz
rust-9a3583f06d7086c8eca70ae5770ecce1a74680be.zip
Make next_power_of_two generic for unsigned integers
Also rename `next_power_of_two_opt` to `checked_next_power_of_two`.
Diffstat (limited to 'src/libstd/sync/mpmc_bounded_queue.rs')
-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 bb0e96f96de..74f3a6f6918 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::next_power_of_two;
 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
-                uint::next_power_of_two(capacity)
+                next_power_of_two(capacity)
             }
         } else {
             capacity