about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-14 13:50:29 +0000
committerbors <bors@rust-lang.org>2022-12-14 13:50:29 +0000
commit5bd9373c5b92f6470777ea86520f31ff96ff4b0d (patch)
tree5aa5a909afa3b62aaf670e516ce163172311e0cb
parent4596847a88abb0d5077c5111c3093e724673d7a0 (diff)
parentef4a9f0ac23f6d4a0e60bf7b299be8995ce686da (diff)
downloadrust-5bd9373c5b92f6470777ea86520f31ff96ff4b0d.tar.gz
rust-5bd9373c5b92f6470777ea86520f31ff96ff4b0d.zip
Auto merge of #13766 - rust-lang:fix-config-patch, r=Veykril
Fix wrong config patching logic for addCallParenthesis
-rw-r--r--crates/rust-analyzer/src/config/patch_old_style.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/config/patch_old_style.rs b/crates/rust-analyzer/src/config/patch_old_style.rs
index 472e2e0eeea..3b174a71934 100644
--- a/crates/rust-analyzer/src/config/patch_old_style.rs
+++ b/crates/rust-analyzer/src/config/patch_old_style.rs
@@ -116,7 +116,7 @@ pub(super) fn patch_json_for_outdated_configs(json: &mut Value) {
         copy.pointer("/completion/addCallParenthesis"),
     ) {
         (Some(Value::Bool(true)), Some(Value::Bool(true))) => json!("fill_arguments"),
-        (Some(Value::Bool(true)), _) => json!("add_parentheses"),
+        (_, Some(Value::Bool(true))) => json!("add_parentheses"),
         (Some(Value::Bool(false)), Some(Value::Bool(false))) => json!("none"),
         (_, _) => return,
     };