mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 06:03:58 +00:00
Improve readability
This commit is contained in:
parent
edb820c329
commit
896a162f55
1 changed files with 11 additions and 14 deletions
|
@ -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 };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue