Skip to content

Commit 0c3d15e

Browse files
addshorefloitsch
andcommitted
Use "not" not "== false"
Extracted from: #1 Co-authored-by: Florian Loitsch <[email protected]>
1 parent 12a4a77 commit 0c3d15e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/services/comms/comms.toit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class Comms:
217217
yield
218218

219219
// If there are no waiting lambdas for the msg id, then latchForMessage can be released
220-
if (lambdasForBadAck.contains respondingTo) == false and (lambdasForGoodAck.contains respondingTo) == false and (lambdasForBadResponse.contains respondingTo) == false and (lambdasForGoodResponse.contains respondingTo) == false:
220+
if not lambdasForBadAck.contains respondingTo and not lambdasForGoodAck.contains respondingTo and not lambdasForBadResponse.contains respondingTo and not lambdasForGoodResponse.contains respondingTo:
221221
// Remove remaining timeouts, and release the latch
222222
if waitTimeouts.contains respondingTo:
223223
waitTimeouts.remove respondingTo

src/services/httpmsg/service.toit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class HttpMsg:
105105
tasksWaiting++
106106
task::
107107
response := msgLatch.get
108-
if response == false:
108+
if not response:
109109
writer.out.write "$(msg.msgId) No response...\n"
110110
else:
111111
write-msg-out writer response

0 commit comments

Comments
 (0)