2568: Add option to disable all-targets. r=matklad a=pftbest

Can be useful in embedded.

Co-authored-by: Vadzim Dambrouski <vadzim.dambrouski@promwad.com>
This commit is contained in:
bors[bot]
2019-12-17 13:28:37 +00:00
committed by GitHub
3 changed files with 18 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ export interface CargoWatchOptions {
command: string;
trace: CargoWatchTraceOptions;
ignore: string[];
allTargets: boolean;
}
export interface CargoFeatures {
@@ -40,6 +41,7 @@ export class Config {
arguments: '',
command: '',
ignore: [],
allTargets: true,
};
public cargoFeatures: CargoFeatures = {
noDefaultFeatures: false,
@@ -132,6 +134,13 @@ export class Config {
);
}
if (config.has('cargo-watch.allTargets')) {
this.cargoWatchOptions.allTargets = config.get<boolean>(
'cargo-watch.allTargets',
true,
);
}
if (config.has('lruCapacity')) {
this.lruCapacity = config.get('lruCapacity') as number;
}