File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -241,15 +241,8 @@ impl Config {
241241 set ( value, "/checkOnSave/extraArgs" , extra_args) ;
242242 set ( value, "/checkOnSave/command" , command) ;
243243 set ( value, "/checkOnSave/allTargets" , all_targets) ;
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- }
249- set ( value, "/checkOnSave/features" , features) ;
250- if features. is_empty ( ) && !self . cargo . features . is_empty ( ) {
251- * features = self . cargo . features . clone ( ) ;
252- }
244+ * all_features = get ( value, "/checkOnSave/allFeatures" ) . unwrap_or ( self . cargo . all_features ) ;
245+ * features = get ( value, "/checkOnSave/features" ) . unwrap_or ( self . cargo . features . clone ( ) ) ;
253246 }
254247 }
255248 } ;
Original file line number Diff line number Diff line change 326326 "markdownDescription" : " Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`."
327327 },
328328 "rust-analyzer.checkOnSave.features" : {
329- "type" : " array" ,
329+ "type" : [
330+ " null" ,
331+ " array"
332+ ],
330333 "items" : {
331334 "type" : " string"
332335 },
333- "default" : [] ,
336+ "default" : null ,
334337 "description" : " List of features to activate. Defaults to `rust-analyzer.cargo.features`."
335338 },
336339 "rust-analyzer.inlayHints.enable" : {
You can’t perform that action at this time.
0 commit comments