From 8c0cfb87f5a214803552fc653afa302ff4535cf0 Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Tue, 28 Jul 2026 13:15:11 +0200 Subject: [PATCH] Fix unused-result warning on dropDestination handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SwiftUI's dropDestination(for:action:) action closure is Void- returning, not Bool, so handleDrop's Bool return was being silently discarded — made the discard explicit with _ =. --- oAI/Views/Main/SidebarView.swift | 4 ++-- oAI/Views/Screens/ConversationListView.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/oAI/Views/Main/SidebarView.swift b/oAI/Views/Main/SidebarView.swift index c327b54..8d037af 100644 --- a/oAI/Views/Main/SidebarView.swift +++ b/oAI/Views/Main/SidebarView.swift @@ -150,7 +150,7 @@ struct SidebarView: View { } header: { Text("Unfiled") .dropDestination(for: String.self) { items, _ in - handleDrop(items, toFolder: nil) + _ = handleDrop(items, toFolder: nil) } } } @@ -192,7 +192,7 @@ struct SidebarView: View { } } .dropDestination(for: String.self) { items, _ in - handleDrop(items, toFolder: folder.id) + _ = handleDrop(items, toFolder: folder.id) } } diff --git a/oAI/Views/Screens/ConversationListView.swift b/oAI/Views/Screens/ConversationListView.swift index 5d5099f..d462cc4 100644 --- a/oAI/Views/Screens/ConversationListView.swift +++ b/oAI/Views/Screens/ConversationListView.swift @@ -240,7 +240,7 @@ struct ConversationListView: View { } header: { Text("Unfiled") .dropDestination(for: String.self) { items, _ in - handleDrop(items, toFolder: nil) + _ = handleDrop(items, toFolder: nil) } } } @@ -431,7 +431,7 @@ struct ConversationListView: View { } } .dropDestination(for: String.self) { items, _ in - handleDrop(items, toFolder: folder.id) + _ = handleDrop(items, toFolder: folder.id) } }