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 {
241
241
set ( value, "/checkOnSave/extraArgs" , extra_args) ;
242
242
set ( value, "/checkOnSave/command" , command) ;
243
243
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 ( ) ) ;
253
246
}
254
247
}
255
248
} ;
Original file line number Diff line number Diff line change 326
326
"markdownDescription" : " Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`."
327
327
},
328
328
"rust-analyzer.checkOnSave.features" : {
329
- "type" : " array" ,
329
+ "type" : [
330
+ " null" ,
331
+ " array"
332
+ ],
330
333
"items" : {
331
334
"type" : " string"
332
335
},
333
- "default" : [] ,
336
+ "default" : null ,
334
337
"description" : " List of features to activate. Defaults to `rust-analyzer.cargo.features`."
335
338
},
336
339
"rust-analyzer.inlayHints.enable" : {
You can’t perform that action at this time.
0 commit comments