From a32dd9c478fec0c21fa7416c267bdf1d2416b355 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Mon, 20 Jul 2020 18:11:32 -0400 Subject: Protect against `{}` --- crates/rust-analyzer/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 3a0aa4183..6870d032b 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -178,7 +178,7 @@ impl Config { pub fn update(&mut self, json: serde_json::Value) { log::info!("Config::update({:#})", json); - if json.is_null() { + if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) { return; } -- cgit v1.2.3