Move SmallVec::new to top so it appears first in rustdoc.

This commit is contained in:
Corey Farwell
2016-11-18 22:40:02 -05:00
parent bd5212556a
commit 586123eb0e
+10 -12
View File
@@ -137,6 +137,16 @@ pub struct SmallVec<A: Array> {
}
impl<A: Array> SmallVec<A> {
#[inline]
pub fn new() -> SmallVec<A> {
unsafe {
SmallVec {
len: 0,
data: Inline { array: mem::zeroed() },
}
}
}
pub unsafe fn set_len(&mut self, new_len: usize) {
self.len = new_len
}
@@ -435,18 +445,6 @@ impl<A: Array> fmt::Debug for SmallVec<A> where A::Item: fmt::Debug {
}
}
impl<A: Array> SmallVec<A> {
#[inline]
pub fn new() -> SmallVec<A> {
unsafe {
SmallVec {
len: 0,
data: Inline { array: mem::zeroed() },
}
}
}
}
impl<A: Array> Default for SmallVec<A> {
#[inline]
fn default() -> SmallVec<A> {