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

@ -24,6 +24,7 @@ use serde::Serialize;
use workspace::{
item::{Item, ItemHandle},
searchable::{SearchableItem, SearchableItemHandle},
smallvec::SmallVec,
AppState, Workspace,
};
@ -258,8 +259,8 @@ impl Item for FeedbackEditor {
self.editor.for_each_project_item(cx, f)
}
fn to_item_events(_: &Self::Event) -> Vec<workspace::item::ItemEvent> {
Vec::new()
fn to_item_events(_: &Self::Event) -> SmallVec<[workspace::item::ItemEvent; 2]> {
SmallVec::new()
}
fn is_singleton(&self, _: &AppContext) -> bool {