Remove if-not-else patterns (#10402)
This commit is contained in:
parent
36a87d0f5c
commit
eb6f7c1240
24 changed files with 99 additions and 99 deletions
|
@ -295,10 +295,10 @@ fn labels_from_wit(
|
|||
.into_iter()
|
||||
.map(|label| {
|
||||
let label = label?;
|
||||
let runs = if !label.code.is_empty() {
|
||||
language.highlight_text(&label.code.as_str().into(), 0..label.code.len())
|
||||
} else {
|
||||
let runs = if label.code.is_empty() {
|
||||
Vec::new()
|
||||
} else {
|
||||
language.highlight_text(&label.code.as_str().into(), 0..label.code.len())
|
||||
};
|
||||
build_code_label(&label, &runs, &language)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue