Properly extract package name out of cargo pkgid (#10929)

Fixes https://github.com/zed-industries/zed/issues/10925

Uses correct package name to generate Rust `cargo` tasks.
Also deduplicates lines in task modal item tooltips.

Release Notes:

- Fixed Rust tasks using incorrect package name
([10925](https://github.com/zed-industries/zed/issues/10925))
This commit is contained in:
Kirill Bulatov 2024-04-24 14:12:59 +03:00 committed by GitHub
parent 135a5f2114
commit 6108140a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 21 deletions

View file

@ -313,7 +313,9 @@ impl PickerDelegate for TasksModalDelegate {
String::new()
};
if let Some(resolved) = resolved_task.resolved.as_ref() {
if display_label != resolved.command_label {
if resolved.command_label != display_label
&& resolved.command_label != resolved_task.resolved_label
{
if !tooltip_label_text.trim().is_empty() {
tooltip_label_text.push('\n');
}