Remove if-not-else patterns (#10402)

This commit is contained in:
Joseph T. Lyons 2024-04-11 03:48:06 -04:00 committed by GitHub
parent 36a87d0f5c
commit eb6f7c1240
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 99 additions and 99 deletions

View file

@ -69,12 +69,7 @@ impl RichText {
..id.style(theme.syntax()).unwrap_or_default()
},
Highlight::InlineCode(link) => {
if !*link {
HighlightStyle {
background_color: Some(code_background),
..Default::default()
}
} else {
if *link {
HighlightStyle {
background_color: Some(code_background),
underline: Some(UnderlineStyle {
@ -83,6 +78,11 @@ impl RichText {
}),
..Default::default()
}
} else {
HighlightStyle {
background_color: Some(code_background),
..Default::default()
}
}
}
Highlight::Highlight(highlight) => *highlight,