mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-18 17:40:29 +00:00
return value directly from if/else block
This commit is contained in:
parent
4f8ffd0ba4
commit
0a0817905e
2 changed files with 9 additions and 8 deletions
|
@ -83,11 +83,12 @@ fn path_segment(p: &mut Parser<'_>, mode: Mode, first: bool) {
|
|||
}
|
||||
p.expect(T![>]);
|
||||
} else {
|
||||
let mut empty = true;
|
||||
if first {
|
||||
let empty = if first {
|
||||
p.eat(T![::]);
|
||||
empty = false;
|
||||
}
|
||||
false
|
||||
} else {
|
||||
true
|
||||
};
|
||||
match p.current() {
|
||||
IDENT => {
|
||||
name_ref(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue