5210: Fix workspace reloading r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-07-03 15:19:34 +00:00 committed by GitHub
commit dceec6176b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,6 @@
use std::{ffi::OsString, path::PathBuf}; use std::{ffi::OsString, path::PathBuf};
use crate::diagnostics::DiagnosticsConfig;
use flycheck::FlycheckConfig; use flycheck::FlycheckConfig;
use lsp_types::ClientCapabilities; use lsp_types::ClientCapabilities;
use ra_db::AbsPathBuf; use ra_db::AbsPathBuf;
@ -17,6 +16,8 @@ use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest}; use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
use serde::Deserialize; use serde::Deserialize;
use crate::diagnostics::DiagnosticsConfig;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Config { pub struct Config {
pub client_caps: ClientCapsConfig, pub client_caps: ClientCapsConfig,
@ -182,8 +183,10 @@ impl Config {
log::info!("Config::update({:#})", value); log::info!("Config::update({:#})", value);
let client_caps = self.client_caps.clone(); let client_caps = self.client_caps.clone();
let linked_projects = self.linked_projects.clone();
*self = Config::new(self.root_path.clone()); *self = Config::new(self.root_path.clone());
self.client_caps = client_caps; self.client_caps = client_caps;
self.linked_projects = linked_projects;
set(value, "/withSysroot", &mut self.with_sysroot); set(value, "/withSysroot", &mut self.with_sysroot);
set(value, "/diagnostics/enable", &mut self.publish_diagnostics); set(value, "/diagnostics/enable", &mut self.publish_diagnostics);