diff options
author | memoryruins <[email protected]> | 2020-01-15 03:52:49 +0000 |
---|---|---|
committer | memoryruins <[email protected]> | 2020-01-15 03:52:49 +0000 |
commit | 896a162f5591f632ed457aa3a34335460755eb68 (patch) | |
tree | 48d36e0c6a367de2a28e43e69f85ab3d05ed2e67 /editors | |
parent | edb820c3293142b034a20f4502192080fe74072a (diff) |
Improve readability
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/config.ts | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index c6d5fc4af..fc21c8813 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -174,22 +174,19 @@ export class Config { | |||
174 | requireReloadMessage = 'Changing cargo features requires a reload'; | 174 | requireReloadMessage = 'Changing cargo features requires a reload'; |
175 | } | 175 | } |
176 | this.prevCargoFeatures = { ...this.cargoFeatures }; | 176 | this.prevCargoFeatures = { ...this.cargoFeatures }; |
177 | 177 | ||
178 | if ( | 178 | if (this.prevCargoWatchOptions !== null) { |
179 | this.prevCargoWatchOptions !== null && | 179 | const changed = |
180 | (this.cargoWatchOptions.enable !== | 180 | this.cargoWatchOptions.enable !== this.prevCargoWatchOptions.enable || |
181 | this.prevCargoWatchOptions.enable || | 181 | this.cargoWatchOptions.command !== this.prevCargoWatchOptions.command || |
182 | this.cargoWatchOptions.command !== | 182 | this.cargoWatchOptions.allTargets !== this.prevCargoWatchOptions.allTargets || |
183 | this.prevCargoWatchOptions.command || | 183 | this.cargoWatchOptions.arguments.length !== this.prevCargoWatchOptions.arguments.length || |
184 | this.cargoWatchOptions.allTargets !== | ||
185 | this.prevCargoWatchOptions.allTargets || | ||
186 | this.cargoWatchOptions.arguments.length !== | ||
187 | this.prevCargoWatchOptions.arguments.length || | ||
188 | this.cargoWatchOptions.arguments.some( | 184 | this.cargoWatchOptions.arguments.some( |
189 | (v, i) => v !== this.prevCargoWatchOptions!.arguments[i], | 185 | (v, i) => v !== this.prevCargoWatchOptions!.arguments[i], |
190 | )) | 186 | ); |
191 | ) { | 187 | if (changed) { |
192 | requireReloadMessage = 'Changing cargo-watch options requires a reload'; | 188 | requireReloadMessage = 'Changing cargo-watch options requires a reload'; |
189 | } | ||
193 | } | 190 | } |
194 | this.prevCargoWatchOptions = { ...this.cargoWatchOptions }; | 191 | this.prevCargoWatchOptions = { ...this.cargoWatchOptions }; |
195 | 192 | ||