Skip to content

Commit 0f434b8

Browse files
committed
move to else f
1 parent 2baef17 commit 0f434b8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/ide/src/syntax_highlighting/highlight.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,12 @@ fn highlight_def(db: &RootDatabase, krate: Option<hir::Crate>, def: Definition)
489489
let ty = local.ty(db);
490490
if local.is_mut(db) || ty.is_mutable_reference() {
491491
h |= HlMod::Mutable;
492+
} else if local.is_ref(db) || ty.is_reference() {
493+
h |= HlMod::Reference;
492494
}
493495
if ty.as_callable(db).is_some() || ty.impls_fnonce(db) {
494496
h |= HlMod::Callable;
495497
}
496-
if local.is_ref(db) || ty.is_reference() {
497-
h |= HlMod::Reference;
498-
}
499498
h
500499
}
501500
Definition::Label(_) => Highlight::new(HlTag::Symbol(SymbolKind::Label)),

0 commit comments

Comments
 (0)