File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,14 @@ use keyframe::{
2525 ease,
2626 functions:: { EaseInOutCubic , EaseOutCubic } ,
2727} ;
28+ use smallvec:: SmallVec ;
2829use std:: {
2930 collections:: { HashMap , HashSet , VecDeque } ,
3031 time:: { Duration , Instant } ,
3132} ;
3233
3334pub struct Tabs < ' a , Message > {
34- elements : Vec < cosmic:: Element < ' a , Message > > ,
35+ elements : SmallVec < [ cosmic:: Element < ' a , Message > ; 16 ] > ,
3536 id : Option < Id > ,
3637 height : Length ,
3738 width : Length ,
@@ -194,7 +195,7 @@ where
194195 . class ( theme:: iced:: Button :: Text )
195196 . on_press ( Message :: scroll_further ( ) ) ;
196197
197- let mut elements = Vec :: with_capacity ( tabs. len ( ) + 5 ) ;
198+ let mut elements = SmallVec :: with_capacity ( tabs. len ( ) + 5 ) ;
198199
199200 elements. push ( widget:: vertical_rule ( 4 ) . class ( rule_style) . into ( ) ) ;
200201 elements. push ( prev_button. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments