mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Merge #5164
5164: Dont show empty progress for empty workspaces r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
f372b13a85
1 changed files with 18 additions and 16 deletions
|
@ -168,22 +168,24 @@ impl GlobalState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vfs::loader::Message::Progress { n_total, n_done } => {
|
vfs::loader::Message::Progress { n_total, n_done } => {
|
||||||
let state = if n_done == 0 {
|
if n_total > 0 {
|
||||||
Progress::Begin
|
let state = if n_done == 0 {
|
||||||
} else if n_done < n_total {
|
Progress::Begin
|
||||||
Progress::Report
|
} else if n_done < n_total {
|
||||||
} else {
|
Progress::Report
|
||||||
assert_eq!(n_done, n_total);
|
} else {
|
||||||
self.status = Status::Ready;
|
assert_eq!(n_done, n_total);
|
||||||
became_ready = true;
|
self.status = Status::Ready;
|
||||||
Progress::End
|
became_ready = true;
|
||||||
};
|
Progress::End
|
||||||
self.report_progress(
|
};
|
||||||
"roots scanned",
|
self.report_progress(
|
||||||
state,
|
"roots scanned",
|
||||||
Some(format!("{}/{}", n_done, n_total)),
|
state,
|
||||||
Some(Progress::percentage(n_done, n_total)),
|
Some(format!("{}/{}", n_done, n_total)),
|
||||||
)
|
Some(Progress::percentage(n_done, n_total)),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Event::Flycheck(task) => match task {
|
Event::Flycheck(task) => match task {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue