Rename RingBuf::new -> with_capacity

This commit is contained in:
Carl Lerche
2016-09-20 13:42:24 -07:00
parent 1f188b5628
commit 4105901244
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ pub struct RingBuf {
// TODO: There are most likely many optimizations that can be made
impl RingBuf {
/// Allocates a new `RingBuf` with the specified capacity.
pub fn new(mut capacity: usize) -> RingBuf {
pub fn with_capacity(mut capacity: usize) -> RingBuf {
// Round to the next power of 2 for better alignment
capacity = capacity.next_power_of_two();