Skip to content

Commit 9d8cff2

Browse files
committed
rename read_config to local_config
1 parent 77e61f7 commit 9d8cff2

File tree

1 file changed

+4
-4
lines changed
  • crates/rust-analyzer/src/config

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl ConcurrentConfigTree {
9090
self.rwlock.write().apply_changes(changes, vfs, &mut errors);
9191
errors
9292
}
93-
pub fn read_config(&self, file_id: FileId) -> Result<Arc<LocalConfigData>, ConfigTreeError> {
93+
pub fn local_config(&self, file_id: FileId) -> Result<Arc<LocalConfigData>, ConfigTreeError> {
9494
let reader = self.rwlock.upgradable_read();
9595
if let Some(computed) = reader.read_only(file_id)? {
9696
return Ok(computed);
@@ -480,7 +480,7 @@ mod tests {
480480

481481
dbg!(config_tree.apply_changes(changes, &vfs));
482482

483-
let local = config_tree.read_config(crate_a).unwrap();
483+
let local = config_tree.local_config(crate_a).unwrap();
484484
// from root
485485
assert_eq!(local.completion_autoself_enable, false);
486486
// from crate_a
@@ -518,11 +518,11 @@ mod tests {
518518
dbg!(config_tree.apply_changes(changes, &vfs));
519519

520520
let prev = local;
521-
let local = config_tree.read_config(crate_a).unwrap();
521+
let local = config_tree.local_config(crate_a).unwrap();
522522
// Should have been recomputed
523523
assert!(!Arc::ptr_eq(&prev, &local));
524524
// But without changes in between, should give the same Arc back
525-
assert!(Arc::ptr_eq(&local, &config_tree.read_config(crate_a).unwrap()));
525+
assert!(Arc::ptr_eq(&local, &config_tree.local_config(crate_a).unwrap()));
526526

527527
// The newly added xdg_config_file_id should affect the output if nothing else touches
528528
// this key

0 commit comments

Comments
 (0)