about summary refs log tree commit diff
path: root/src/libsync/mpmc_bounded_queue.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-11-09 17:15:45 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-11-13 02:02:44 +1100
commitd1eb68e8d7d2883c70304021d5443c96bca18abb (patch)
treefcbd0118799d497f3b4eeac80dc8881532261447 /src/libsync/mpmc_bounded_queue.rs
parent9fe94bd995ab13afab7078a708b01f365740d2cd (diff)
downloadrust-d1eb68e8d7d2883c70304021d5443c96bca18abb.tar.gz
rust-d1eb68e8d7d2883c70304021d5443c96bca18abb.zip
Create UnsignedInt trait and deprecate free functions
Diffstat (limited to 'src/libsync/mpmc_bounded_queue.rs')
-rw-r--r--src/libsync/mpmc_bounded_queue.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsync/mpmc_bounded_queue.rs b/src/libsync/mpmc_bounded_queue.rs
index f75511ecbc2..4414f710b15 100644
--- a/src/libsync/mpmc_bounded_queue.rs
+++ b/src/libsync/mpmc_bounded_queue.rs
@@ -34,7 +34,7 @@ use core::prelude::*;
 
 use alloc::arc::Arc;
 use collections::Vec;
-use core::num::next_power_of_two;
+use core::num::UnsignedInt;
 use core::cell::UnsafeCell;
 
 use atomic::{AtomicUint,Relaxed,Release,Acquire};
@@ -66,7 +66,7 @@ impl<T: Send> State<T> {
                 2u
             } else {
                 // use next power of 2 as capacity
-                next_power_of_two(capacity)
+                capacity.next_power_of_two()
             }
         } else {
             capacity