Remove if-not-else patterns (#10402)
This commit is contained in:
parent
36a87d0f5c
commit
eb6f7c1240
24 changed files with 99 additions and 99 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue