Switch from vec to smallvec

This commit is contained in:
Mikayla Maki 2023-02-13 12:49:57 -08:00
parent 0a50d271b7
commit d80dba1fe3
9 changed files with 32 additions and 20 deletions

View file

@ -11,6 +11,7 @@ use gpui::{
};
use project::Project;
use settings::Settings;
use smallvec::SmallVec;
use theme::{ColorScheme, Layer, Style, StyleSet};
use workspace::{
item::{Item, ItemEvent},
@ -350,8 +351,8 @@ impl Item for ThemeTestbench {
gpui::Task::ready(Ok(()))
}
fn to_item_events(_: &Self::Event) -> Vec<ItemEvent> {
Vec::new()
fn to_item_events(_: &Self::Event) -> SmallVec<[ItemEvent; 2]> {
SmallVec::new()
}
fn serialized_item_kind() -> Option<&'static str> {