diff options
author | Aleksey Kladov <[email protected]> | 2020-07-09 23:28:12 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-10 09:07:08 +0100 |
commit | 17edf50e2c8ce92a6f056e311d68000d64838873 (patch) | |
tree | 9df1537579505c82646c5d156a7f541bf18bd018 /crates/rust-analyzer/src/main_loop.rs | |
parent | 5fc84f071d8fe1792db1f20bf735ec6b85a51a2f (diff) |
Avoid accidently stumping over config values
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 4e556bd50..b48239058 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -467,10 +467,10 @@ impl GlobalState { | |||
467 | (Some(err), _) => { | 467 | (Some(err), _) => { |
468 | log::error!("failed to fetch the server settings: {:?}", err) | 468 | log::error!("failed to fetch the server settings: {:?}", err) |
469 | } | 469 | } |
470 | (None, Some(configs)) => { | 470 | (None, Some(mut configs)) => { |
471 | if let Some(new_config) = configs.get(0) { | 471 | if let Some(json) = configs.get_mut(0) { |
472 | let mut config = this.config.clone(); | 472 | let mut config = this.config.clone(); |
473 | config.update(&new_config); | 473 | config.update(json.take()); |
474 | this.update_configuration(config); | 474 | this.update_configuration(config); |
475 | } | 475 | } |
476 | } | 476 | } |