gpui: Implement From<String> for ElementId (#44447)
Release Notes:
- N/A
## Before
```rs
div()
.id(SharedString::from(format!("process-entry-{ix}-command")))
```
## After
```rs
div()
.id(format!("process-entry-{ix}-command"))
```
This commit is contained in:
@@ -911,7 +911,7 @@ impl PickerDelegate for BranchListDelegate {
|
||||
});
|
||||
|
||||
Some(
|
||||
ListItem::new(SharedString::from(format!("vcs-menu-{ix}")))
|
||||
ListItem::new(format!("vcs-menu-{ix}"))
|
||||
.inset(true)
|
||||
.spacing(ListItemSpacing::Sparse)
|
||||
.toggle_state(selected)
|
||||
|
||||
@@ -220,7 +220,7 @@ impl PickerDelegate for PickerPromptDelegate {
|
||||
let shortened_option = util::truncate_and_trailoff(&hit.string, self.max_match_length);
|
||||
|
||||
Some(
|
||||
ListItem::new(SharedString::from(format!("picker-prompt-menu-{ix}")))
|
||||
ListItem::new(format!("picker-prompt-menu-{ix}"))
|
||||
.inset(true)
|
||||
.spacing(ListItemSpacing::Sparse)
|
||||
.toggle_state(selected)
|
||||
|
||||
@@ -464,7 +464,7 @@ impl PickerDelegate for StashListDelegate {
|
||||
);
|
||||
|
||||
Some(
|
||||
ListItem::new(SharedString::from(format!("stash-{ix}")))
|
||||
ListItem::new(format!("stash-{ix}"))
|
||||
.inset(true)
|
||||
.spacing(ListItemSpacing::Sparse)
|
||||
.toggle_state(selected)
|
||||
|
||||
@@ -665,7 +665,7 @@ impl PickerDelegate for WorktreeListDelegate {
|
||||
};
|
||||
|
||||
Some(
|
||||
ListItem::new(SharedString::from(format!("worktree-menu-{ix}")))
|
||||
ListItem::new(format!("worktree-menu-{ix}"))
|
||||
.inset(true)
|
||||
.spacing(ListItemSpacing::Sparse)
|
||||
.toggle_state(selected)
|
||||
|
||||
Reference in New Issue
Block a user