5304: Don't show error when speculatively reloading workspace r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-07-10 23:39:44 +00:00 committed by GitHub
commit 539659cde3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,10 +126,12 @@ impl GlobalState {
res.map_err(|err| { res.map_err(|err| {
has_errors = true; has_errors = true;
log::error!("failed to load workspace: {:#}", err); log::error!("failed to load workspace: {:#}", err);
self.show_message( if self.workspaces.is_empty() {
lsp_types::MessageType::Error, self.show_message(
format!("rust-analyzer failed to load workspace: {:#}", err), lsp_types::MessageType::Error,
); format!("rust-analyzer failed to load workspace: {:#}", err),
);
}
}) })
.ok() .ok()
}) })