Add option to disable all-targets.

Can be useful in embedded.
This commit is contained in:
Vadzim Dambrouski 2019-12-15 23:02:13 +05:30
parent 4e24b25c66
commit a85cd6455a
3 changed files with 18 additions and 1 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;
}