From d4214ec502225e549e5fe4b3ddd5a2969812e705 Mon Sep 17 00:00:00 2001 From: Ali Bektas Date: Sun, 21 Jul 2024 22:50:49 +0200 Subject: [PATCH] Rename `config::get_field` to `config::get_field_json` --- crates/rust-analyzer/src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index a0ec3920e6..9f158447d8 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -761,7 +761,7 @@ impl Config { tracing::info!("updating config from JSON: {:#}", json); if !(json.is_null() || json.as_object().map_or(false, |it| it.is_empty())) { let mut json_errors = vec![]; - let detached_files = get_field::>( + let detached_files = get_field_json::>( &mut json, &mut json_errors, "detachedFiles", @@ -2485,7 +2485,7 @@ macro_rules! _config_data { fn from_json(json: &mut serde_json::Value, error_sink: &mut Vec<(String, serde_json::Error)>) -> Self { Self {$( - $field: get_field( + $field: get_field_json( json, error_sink, stringify!($field), @@ -2603,7 +2603,7 @@ impl GlobalLocalConfigInput { } } -fn get_field( +fn get_field_json( json: &mut serde_json::Value, error_sink: &mut Vec<(String, serde_json::Error)>, field: &'static str,