Don't return Result
from TextStyle::highlight
This commit is contained in:
parent
48b3a90fbf
commit
1def355d44
4 changed files with 13 additions and 27 deletions
|
@ -578,12 +578,7 @@ impl DisplaySnapshot {
|
|||
line.push_str(chunk.chunk);
|
||||
|
||||
let text_style = if let Some(style) = chunk.style {
|
||||
editor_style
|
||||
.text
|
||||
.clone()
|
||||
.highlight(style)
|
||||
.map(Cow::Owned)
|
||||
.unwrap_or_else(|_| Cow::Borrowed(&editor_style.text))
|
||||
Cow::Owned(editor_style.text.clone().highlight(style))
|
||||
} else {
|
||||
Cow::Borrowed(&editor_style.text)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue