File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ config_data! {
182
182
/// `["aarch64-apple-darwin", "x86_64-apple-darwin"]`.
183
183
///
184
184
/// Aliased as `"checkOnSave.targets"`.
185
- checkOnSave_target | checkOnSave_targets: CheckOnSaveTargets = "[] " ,
185
+ checkOnSave_target | checkOnSave_targets: Option < CheckOnSaveTargets > = "null " ,
186
186
187
187
/// Toggles the additional completions that automatically add imports when completed.
188
188
/// Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
@@ -1153,10 +1153,15 @@ impl Config {
1153
1153
}
1154
1154
Some ( _) | None => FlycheckConfig :: CargoCommand {
1155
1155
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 ( ) ) ,
1160
1165
all_targets : self . data . checkOnSave_allTargets ,
1161
1166
no_default_features : self
1162
1167
. data
You can’t perform that action at this time.
0 commit comments