Improve readability

This commit is contained in:
memoryruins 2020-01-14 22:52:49 -05:00
parent edb820c329
commit 896a162f55

View file

@ -174,22 +174,19 @@ export class Config {
requireReloadMessage = 'Changing cargo features requires a reload'; requireReloadMessage = 'Changing cargo features requires a reload';
} }
this.prevCargoFeatures = { ...this.cargoFeatures }; this.prevCargoFeatures = { ...this.cargoFeatures };
if ( if (this.prevCargoWatchOptions !== null) {
this.prevCargoWatchOptions !== null && const changed =
(this.cargoWatchOptions.enable !== this.cargoWatchOptions.enable !== this.prevCargoWatchOptions.enable ||
this.prevCargoWatchOptions.enable || this.cargoWatchOptions.command !== this.prevCargoWatchOptions.command ||
this.cargoWatchOptions.command !== this.cargoWatchOptions.allTargets !== this.prevCargoWatchOptions.allTargets ||
this.prevCargoWatchOptions.command || this.cargoWatchOptions.arguments.length !== this.prevCargoWatchOptions.arguments.length ||
this.cargoWatchOptions.allTargets !==
this.prevCargoWatchOptions.allTargets ||
this.cargoWatchOptions.arguments.length !==
this.prevCargoWatchOptions.arguments.length ||
this.cargoWatchOptions.arguments.some( this.cargoWatchOptions.arguments.some(
(v, i) => v !== this.prevCargoWatchOptions!.arguments[i], (v, i) => v !== this.prevCargoWatchOptions!.arguments[i],
)) );
) { if (changed) {
requireReloadMessage = 'Changing cargo-watch options requires a reload'; requireReloadMessage = 'Changing cargo-watch options requires a reload';
}
} }
this.prevCargoWatchOptions = { ...this.cargoWatchOptions }; this.prevCargoWatchOptions = { ...this.cargoWatchOptions };