Skip to content

Commit 16785c8

Browse files
authored
Merge pull request #18396 from lnicola/hide-default-config
internal: Hide `Config::default_config`
2 parents 6342667 + 0d3d891 commit 16785c8

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ smallvec = { version = "1.10.0", features = [
145145
"union",
146146
"const_generics",
147147
] }
148-
smol_str = "0.3.1"
148+
smol_str = "0.3.2"
149149
snap = "1.1.0"
150150
text-size = "1.1.1"
151151
tracing = "0.1.40"

crates/rust-analyzer/src/config.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ enum RatomlFile {
727727
Crate(LocalConfigInput),
728728
}
729729

730-
#[derive(Debug, Clone)]
730+
#[derive(Clone)]
731731
pub struct Config {
732732
/// Projects that have a Cargo.toml or a rust-project.json in a
733733
/// parent directory, so we can discover them by walking the
@@ -765,6 +765,26 @@ pub struct Config {
765765
detached_files: Vec<AbsPathBuf>,
766766
}
767767

768+
impl fmt::Debug for Config {
769+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
770+
f.debug_struct("Config")
771+
.field("discovered_projects_from_filesystem", &self.discovered_projects_from_filesystem)
772+
.field("discovered_projects_from_command", &self.discovered_projects_from_command)
773+
.field("workspace_roots", &self.workspace_roots)
774+
.field("caps", &self.caps)
775+
.field("root_path", &self.root_path)
776+
.field("snippets", &self.snippets)
777+
.field("visual_studio_code_version", &self.visual_studio_code_version)
778+
.field("client_config", &self.client_config)
779+
.field("user_config", &self.user_config)
780+
.field("ratoml_file", &self.ratoml_file)
781+
.field("source_root_parent_map", &self.source_root_parent_map)
782+
.field("validation_errors", &self.validation_errors)
783+
.field("detached_files", &self.detached_files)
784+
.finish()
785+
}
786+
}
787+
768788
// Delegate capability fetching methods
769789
impl std::ops::Deref for Config {
770790
type Target = ClientCapabilities;

0 commit comments

Comments
 (0)