Skip to content

Commit abdad6f

Browse files
committed
rename config::ConfigChange::other_errors to validation_errors
1 parent 874564e commit abdad6f

File tree

1 file changed

+5
-6
lines changed
  • src/tools/rust-analyzer/crates/rust-analyzer/src

1 file changed

+5
-6
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,7 @@ pub struct Config {
801801
/// Since it is a `global` command at the moment, its final value can only be determined by
802802
/// traversing through `global` configs and the `client` config. However the non-null value constraint
803803
/// is config level agnostic, so this requires an independent error storage
804-
/// FIXME : bad name I know...
805-
other_errors: ConfigErrors,
804+
validation_errors: ConfigErrors,
806805

807806
detached_files: Vec<AbsPathBuf>,
808807
}
@@ -833,7 +832,7 @@ impl Config {
833832
/// The return tuple's bool component signals whether the `GlobalState` should call its `update_configuration()` method.
834833
fn apply_change_with_sink(&self, change: ConfigChange) -> (Config, bool) {
835834
let mut config = self.clone();
836-
config.other_errors = ConfigErrors::default();
835+
config.validation_errors = ConfigErrors::default();
837836

838837
let mut should_update = false;
839838

@@ -1013,7 +1012,7 @@ impl Config {
10131012
}
10141013

10151014
if config.check_command().is_empty() {
1016-
config.other_errors.0.push(Arc::new(ConfigErrorInner::Json {
1015+
config.validation_errors.0.push(Arc::new(ConfigErrorInner::Json {
10171016
config_key: "/check/command".to_owned(),
10181017
error: serde_json::Error::custom("expected a non-empty string"),
10191018
}));
@@ -1036,7 +1035,7 @@ impl Config {
10361035
.chain(config.root_ratoml.as_ref().into_iter().flat_map(|it| it.1 .0.iter()))
10371036
.chain(config.user_config.as_ref().into_iter().flat_map(|it| it.1 .0.iter()))
10381037
.chain(config.ratoml_files.values().flat_map(|it| it.1 .0.iter()))
1039-
.chain(config.other_errors.0.iter())
1038+
.chain(config.validation_errors.0.iter())
10401039
.cloned()
10411040
.collect(),
10421041
);
@@ -1363,7 +1362,7 @@ impl Config {
13631362
root_ratoml: None,
13641363
root_ratoml_path,
13651364
detached_files: Default::default(),
1366-
other_errors: Default::default(),
1365+
validation_errors: Default::default(),
13671366
}
13681367
}
13691368

0 commit comments

Comments
 (0)