diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-10-24 10:07:54 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-10-24 10:07:54 +0300 |
| commit | f3d97841a399b23af8f226bffd05d1f2ad428dab (patch) | |
| tree | 1a1411e2b7c1d0c17de14f6dfb24f4d2f4bf9870 | |
| parent | 582f1a67d8bfdfc9256cdf173ed9c9ea34c3b00f (diff) | |
| download | rust-f3d97841a399b23af8f226bffd05d1f2ad428dab.tar.gz rust-f3d97841a399b23af8f226bffd05d1f2ad428dab.zip | |
Hide default config in Debug impl
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs index 518b588cb7d..f5b0fcecf39 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs @@ -727,7 +727,7 @@ enum RatomlFile { Crate(LocalConfigInput), } -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct Config { /// Projects that have a Cargo.toml or a rust-project.json in a /// parent directory, so we can discover them by walking the @@ -765,6 +765,26 @@ pub struct Config { detached_files: Vec<AbsPathBuf>, } +impl fmt::Debug for Config { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Config") + .field("discovered_projects_from_filesystem", &self.discovered_projects_from_filesystem) + .field("discovered_projects_from_command", &self.discovered_projects_from_command) + .field("workspace_roots", &self.workspace_roots) + .field("caps", &self.caps) + .field("root_path", &self.root_path) + .field("snippets", &self.snippets) + .field("visual_studio_code_version", &self.visual_studio_code_version) + .field("client_config", &self.client_config) + .field("user_config", &self.user_config) + .field("ratoml_file", &self.ratoml_file) + .field("source_root_parent_map", &self.source_root_parent_map) + .field("validation_errors", &self.validation_errors) + .field("detached_files", &self.detached_files) + .finish() + } +} + // Delegate capability fetching methods impl std::ops::Deref for Config { type Target = ClientCapabilities; |
