aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/main_loop.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-01-06 12:46:31 +0000
committerAleksey Kladov <[email protected]>2021-01-06 12:46:31 +0000
commit66ed821e18eadd3930a8621095c90b142763d517 (patch)
tree8fb1eb11fa56bf7d9669ef195c1baaa1e3eb2fdc /crates/rust-analyzer/src/main_loop.rs
parentf7a15b5cd1df58e46066bbd27c90cb1ad7f9c316 (diff)
Speed up snapshoting
Config can be fairly big, no need to deep clone it frequently
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r--crates/rust-analyzer/src/main_loop.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 53f9546b8..7ac6acf70 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -609,7 +609,7 @@ impl GlobalState {
609 if let Some(json) = configs.get_mut(0) { 609 if let Some(json) = configs.get_mut(0) {
610 // Note that json can be null according to the spec if the client can't 610 // Note that json can be null according to the spec if the client can't
611 // provide a configuration. This is handled in Config::update below. 611 // provide a configuration. This is handled in Config::update below.
612 let mut config = this.config.clone(); 612 let mut config = Config::clone(&*this.config);
613 config.update(json.take()); 613 config.update(json.take());
614 this.update_configuration(config); 614 this.update_configuration(config);
615 } 615 }