From ca6ea5cb1a89d10640a190d03db45f8ab0758699 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Mon, 10 Jun 2024 13:57:20 +0200 Subject: [PATCH] Simplify for loop --- src/org/kde/kdeconnect/Device.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/kde/kdeconnect/Device.kt b/src/org/kde/kdeconnect/Device.kt index 9c53203c..bc07a56a 100644 --- a/src/org/kde/kdeconnect/Device.kt +++ b/src/org/kde/kdeconnect/Device.kt @@ -315,8 +315,8 @@ class Device : PacketReceiver { synchronized(sendChannel) { if (sendCoroutine == null) { sendCoroutine = CoroutineScope(Dispatchers.IO).launch { - for (item in sendChannel) { - sendPacketBlocking(item.np, item.callback) + for ((np, callback) in sendChannel) { + sendPacketBlocking(np, callback) } } }