File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ config_data! {
182182 /// `["aarch64-apple-darwin", "x86_64-apple-darwin"]`.
183183 ///
184184 /// Aliased as `"checkOnSave.targets"`.
185- checkOnSave_target | checkOnSave_targets: CheckOnSaveTargets = "[] " ,
185+ checkOnSave_target | checkOnSave_targets: Option < CheckOnSaveTargets > = "null " ,
186186
187187 /// Toggles the additional completions that automatically add imports when completed.
188188 /// Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
@@ -1153,10 +1153,15 @@ impl Config {
11531153 }
11541154 Some ( _) | None => FlycheckConfig :: CargoCommand {
11551155 command : self . data . checkOnSave_command . clone ( ) ,
1156- target_triples : match & self . data . checkOnSave_target . 0 [ ..] {
1157- [ ] => self . data . cargo_target . clone ( ) . into_iter ( ) . collect ( ) ,
1158- targets => targets. into ( ) ,
1159- } ,
1156+ target_triples : self
1157+ . data
1158+ . checkOnSave_target
1159+ . clone ( )
1160+ . and_then ( |targets| match & targets. 0 [ ..] {
1161+ [ ] => None ,
1162+ targets => Some ( targets. into ( ) ) ,
1163+ } )
1164+ . unwrap_or_else ( || self . data . cargo_target . clone ( ) . into_iter ( ) . collect ( ) ) ,
11601165 all_targets : self . data . checkOnSave_allTargets ,
11611166 no_default_features : self
11621167 . data
You can’t perform that action at this time.
0 commit comments