This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ function exec(command, { cwd } = {}) {
26
26
}
27
27
28
28
function logErr ( e , logFn = console . warn ) {
29
- e && logFn ( `${ e } ` )
29
+ if ( e ) {
30
+ logFn ( `${ e } ` )
31
+ }
30
32
}
31
33
32
34
function clearIdeRustNotifications ( prefix = "ide-rust" ) {
@@ -307,11 +309,12 @@ class RustLanguageClient extends AutoLanguageClient {
307
309
. then ( ( ) => this . _restartLanguageServers ( `Updated rust toolchain` ) )
308
310
. catch ( ( e ) => {
309
311
logErr ( e )
310
- e &&
312
+ if ( e ) {
311
313
atom . notifications . addError ( `\`rustup update ${ toolchain } \` failed` , {
312
314
detail : e ,
313
315
dismissable : true ,
314
316
} )
317
+ }
315
318
} )
316
319
317
320
if ( this . busySignalService ) {
@@ -413,7 +416,7 @@ class RustLanguageClient extends AutoLanguageClient {
413
416
. catch ( logErr )
414
417
}
415
418
} catch ( e ) {
416
- e && console . warn ( e )
419
+ console . warn ( e )
417
420
}
418
421
}
419
422
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ class RustProject {
36
36
this . server . process . on ( "exit" , ( ) => {
37
37
this . _progress . forEach ( ( msg ) => msg . dispose ( ) )
38
38
this . _progress . clear ( )
39
- this . _rustDocBusyMessage && this . _rustDocBusyMessage . dispose ( )
39
+ if ( this . _rustDocBusyMessage ) {
40
+ this . _rustDocBusyMessage . dispose ( )
41
+ }
40
42
} )
41
43
}
42
44
You can’t perform that action at this time.
0 commit comments