File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ pub struct SmallVec<A: Array> {
137137}
138138
139139impl < A : Array > SmallVec < A > {
140+ #[ inline]
141+ pub fn new ( ) -> SmallVec < A > {
142+ unsafe {
143+ SmallVec {
144+ len : 0 ,
145+ data : Inline { array : mem:: zeroed ( ) } ,
146+ }
147+ }
148+ }
149+
140150 pub unsafe fn set_len ( & mut self , new_len : usize ) {
141151 self . len = new_len
142152 }
@@ -435,18 +445,6 @@ impl<A: Array> fmt::Debug for SmallVec<A> where A::Item: fmt::Debug {
435445 }
436446}
437447
438- impl < A : Array > SmallVec < A > {
439- #[ inline]
440- pub fn new ( ) -> SmallVec < A > {
441- unsafe {
442- SmallVec {
443- len : 0 ,
444- data : Inline { array : mem:: zeroed ( ) } ,
445- }
446- }
447- }
448- }
449-
450448impl < A : Array > Default for SmallVec < A > {
451449 #[ inline]
452450 fn default ( ) -> SmallVec < A > {
You can’t perform that action at this time.
0 commit comments