chore: Clean up allocs around project panel (#15422)

A drive-by I did when looking at something else.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-07-29 14:21:41 +02:00 committed by GitHub
parent 6af72ab53a
commit c97d035eea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 18 deletions

View file

@ -94,7 +94,7 @@ enum ClipboardEntry {
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct EntryDetails {
filename: String,
icon: Option<Arc<str>>,
icon: Option<SharedString>,
path: Arc<Path>,
depth: usize,
kind: EntryKind,
@ -108,7 +108,7 @@ pub struct EntryDetails {
git_status: Option<GitFileStatus>,
is_private: bool,
worktree_id: WorktreeId,
canonical_path: Option<PathBuf>,
canonical_path: Option<Box<Path>>,
}
#[derive(PartialEq, Clone, Default, Debug, Deserialize)]
@ -2538,7 +2538,7 @@ impl Render for DraggedProjectEntryView {
.indent_level(self.details.depth)
.indent_step_size(px(settings.indent_size))
.child(if let Some(icon) = &self.details.icon {
div().child(Icon::from_path(icon.to_string()))
div().child(Icon::from_path(icon.clone()))
} else {
div()
})