mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Fix panic when trying to render a diagnostic that has no message
This commit is contained in:
parent
4929b8c525
commit
3fc3e51a44
1 changed files with 1 additions and 1 deletions
|
@ -397,7 +397,7 @@ impl View for DiagnosticMessage {
|
||||||
if let Some(diagnostic) = &self.diagnostic {
|
if let Some(diagnostic) = &self.diagnostic {
|
||||||
let theme = &self.settings.borrow().theme.workspace.status_bar;
|
let theme = &self.settings.borrow().theme.workspace.status_bar;
|
||||||
Label::new(
|
Label::new(
|
||||||
diagnostic.message.lines().next().unwrap().to_string(),
|
diagnostic.message.split('\n').next().unwrap().to_string(),
|
||||||
theme.diagnostic_message.clone(),
|
theme.diagnostic_message.clone(),
|
||||||
)
|
)
|
||||||
.contained()
|
.contained()
|
||||||
|
|
Loading…
Reference in a new issue