Fix unused-result warning on dropDestination handlers
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 _ =.
This commit is contained in:
@@ -150,7 +150,7 @@ struct SidebarView: View {
|
|||||||
} header: {
|
} header: {
|
||||||
Text("Unfiled")
|
Text("Unfiled")
|
||||||
.dropDestination(for: String.self) { items, _ in
|
.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
|
.dropDestination(for: String.self) { items, _ in
|
||||||
handleDrop(items, toFolder: folder.id)
|
_ = handleDrop(items, toFolder: folder.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ struct ConversationListView: View {
|
|||||||
} header: {
|
} header: {
|
||||||
Text("Unfiled")
|
Text("Unfiled")
|
||||||
.dropDestination(for: String.self) { items, _ in
|
.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
|
.dropDestination(for: String.self) { items, _ in
|
||||||
handleDrop(items, toFolder: folder.id)
|
_ = handleDrop(items, toFolder: folder.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user