diff options
author | Aleksey Kladov <[email protected]> | 2020-08-12 15:32:36 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-12 15:35:29 +0100 |
commit | 208b7bd7ba687fb570feb1b89219f14c63712ce8 (patch) | |
tree | c39749d1b71b73b4017c2d0d848ebdc85e570c39 /crates/rust-analyzer/src/reload.rs | |
parent | 98baa9b569b49162392ed4149dd435854fe941b8 (diff) |
Rename ra_prof -> profile
Diffstat (limited to 'crates/rust-analyzer/src/reload.rs')
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 1907f2f13..f74f2c02c 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -4,7 +4,6 @@ use std::{mem, sync::Arc}; | |||
4 | use flycheck::FlycheckHandle; | 4 | use flycheck::FlycheckHandle; |
5 | use ra_db::{CrateGraph, SourceRoot, VfsPath}; | 5 | use ra_db::{CrateGraph, SourceRoot, VfsPath}; |
6 | use ra_ide::AnalysisChange; | 6 | use ra_ide::AnalysisChange; |
7 | use ra_prof::profile; | ||
8 | use ra_project_model::{ProcMacroClient, ProjectWorkspace}; | 7 | use ra_project_model::{ProcMacroClient, ProjectWorkspace}; |
9 | use vfs::{file_set::FileSetConfig, AbsPath, AbsPathBuf, ChangeKind}; | 8 | use vfs::{file_set::FileSetConfig, AbsPath, AbsPathBuf, ChangeKind}; |
10 | 9 | ||
@@ -17,7 +16,7 @@ use crate::{ | |||
17 | 16 | ||
18 | impl GlobalState { | 17 | impl GlobalState { |
19 | pub(crate) fn update_configuration(&mut self, config: Config) { | 18 | pub(crate) fn update_configuration(&mut self, config: Config) { |
20 | let _p = profile("GlobalState::update_configuration"); | 19 | let _p = profile::span("GlobalState::update_configuration"); |
21 | let old_config = mem::replace(&mut self.config, config); | 20 | let old_config = mem::replace(&mut self.config, config); |
22 | if self.config.lru_capacity != old_config.lru_capacity { | 21 | if self.config.lru_capacity != old_config.lru_capacity { |
23 | self.analysis_host.update_lru_capacity(old_config.lru_capacity); | 22 | self.analysis_host.update_lru_capacity(old_config.lru_capacity); |
@@ -115,7 +114,7 @@ impl GlobalState { | |||
115 | }); | 114 | }); |
116 | } | 115 | } |
117 | pub(crate) fn switch_workspaces(&mut self, workspaces: Vec<anyhow::Result<ProjectWorkspace>>) { | 116 | pub(crate) fn switch_workspaces(&mut self, workspaces: Vec<anyhow::Result<ProjectWorkspace>>) { |
118 | let _p = profile("GlobalState::switch_workspaces"); | 117 | let _p = profile::span("GlobalState::switch_workspaces"); |
119 | log::info!("reloading projects: {:?}", self.config.linked_projects); | 118 | log::info!("reloading projects: {:?}", self.config.linked_projects); |
120 | 119 | ||
121 | let mut has_errors = false; | 120 | let mut has_errors = false; |
@@ -300,7 +299,7 @@ pub(crate) struct SourceRootConfig { | |||
300 | 299 | ||
301 | impl SourceRootConfig { | 300 | impl SourceRootConfig { |
302 | pub(crate) fn partition(&self, vfs: &vfs::Vfs) -> Vec<SourceRoot> { | 301 | pub(crate) fn partition(&self, vfs: &vfs::Vfs) -> Vec<SourceRoot> { |
303 | let _p = profile("SourceRootConfig::partition"); | 302 | let _p = profile::span("SourceRootConfig::partition"); |
304 | self.fsc | 303 | self.fsc |
305 | .partition(vfs) | 304 | .partition(vfs) |
306 | .into_iter() | 305 | .into_iter() |