Skip to content

Commit 6512e29

Browse files
committed
Auto merge of #17658 - alibektas:rename_get_field, r=Veykril
minor: Rename `config::get_field` to `config::get_field_json`
2 parents 4afe0d5 + d4214ec commit 6512e29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ impl Config {
857857
tracing::info!("updating config from JSON: {:#}", json);
858858
if !(json.is_null() || json.as_object().map_or(false, |it| it.is_empty())) {
859859
let mut json_errors = vec![];
860-
let detached_files = get_field::<Vec<Utf8PathBuf>>(
860+
let detached_files = get_field_json::<Vec<Utf8PathBuf>>(
861861
&mut json,
862862
&mut json_errors,
863863
"detachedFiles",
@@ -2660,7 +2660,7 @@ macro_rules! _config_data {
26602660

26612661
fn from_json(json: &mut serde_json::Value, error_sink: &mut Vec<(String, serde_json::Error)>) -> Self {
26622662
Self {$(
2663-
$field: get_field(
2663+
$field: get_field_json(
26642664
json,
26652665
error_sink,
26662666
stringify!($field),
@@ -2778,7 +2778,7 @@ impl GlobalLocalConfigInput {
27782778
}
27792779
}
27802780

2781-
fn get_field<T: DeserializeOwned>(
2781+
fn get_field_json<T: DeserializeOwned>(
27822782
json: &mut serde_json::Value,
27832783
error_sink: &mut Vec<(String, serde_json::Error)>,
27842784
field: &'static str,

0 commit comments

Comments
 (0)