dash BleIO: s/let/also

This commit is contained in:
Andrei Vereha 2021-03-03 17:07:18 +01:00
parent 7976df596e
commit c2627176cf

View file

@ -84,9 +84,8 @@ class BleIO(
fun flushIncomingQueues() {
for (char in CharacteristicType.values()) {
do {
val found = incomingPackets[char]?.poll()
found?.let {
aapsLogger.warn(LTag.PUMPBTCOMM, "BleIO: ${char.name} queue not empty, flushing: {${found.toHex()}")
val found = incomingPackets[char]?.poll()?.also {
aapsLogger.warn(LTag.PUMPBTCOMM, "BleIO: ${char.name} queue not empty, flushing: {${it.toHex()}")
}
} while (found != null)
}