diff options
author | Clemens Wasser <[email protected]> | 2020-06-10 08:27:25 +0100 |
---|---|---|
committer | Clemens Wasser <[email protected]> | 2020-06-10 08:27:25 +0100 |
commit | 33b905883819038ad67476fe14b7b48212a73f93 (patch) | |
tree | 7d9968871e81815c876d8cf15b308d4a70a87f68 /crates | |
parent | 47ef544fa57ca1833b466e491315e54a88780b4d (diff) |
Most of the checkOnSafe options now default to the cargo equivalent.
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 320414ecf..617612dc3 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -241,7 +241,11 @@ impl Config { | |||
241 | set(value, "/checkOnSave/extraArgs", extra_args); | 241 | set(value, "/checkOnSave/extraArgs", extra_args); |
242 | set(value, "/checkOnSave/command", command); | 242 | set(value, "/checkOnSave/command", command); |
243 | set(value, "/checkOnSave/allTargets", all_targets); | 243 | set(value, "/checkOnSave/allTargets", all_targets); |
244 | set(value, "/checkOnSave/allFeatures", all_features); | 244 | if let Some(new_all_features) = get(value, "/checkOnSave/allFeatures") { |
245 | *all_features = new_all_features; | ||
246 | } else { | ||
247 | *all_features = self.cargo.all_features; | ||
248 | } | ||
245 | set(value, "/checkOnSave/features", features); | 249 | set(value, "/checkOnSave/features", features); |
246 | if features.is_empty() && !self.cargo.features.is_empty() { | 250 | if features.is_empty() && !self.cargo.features.is_empty() { |
247 | *features = self.cargo.features.clone(); | 251 | *features = self.cargo.features.clone(); |