Skip to content

Commit a347174

Browse files
authored
Fix build warnings (#1358)
1 parent 6f941ea commit a347174

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct AddNumbersView: View {
6363
"firstNumber": $num1.wrappedValue,
6464
"secondNumber": $num2.wrappedValue,
6565
])
66-
if let operationResult = (result as? [String: Any])?["operationResult"] as? Int {
66+
if let operationResult = result["operationResult"] {
6767
self.outcome = String(operationResult)
6868
} else {
6969
self.outcome = "The return result is invalid."

functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct CapitalizeMessageView: View {
4646
responseAs: [String: String].self
4747
)
4848
let result = try await function.call(["text": $comment.wrappedValue])
49-
if let data = result as? [String: Any], let text = data["text"] as? String {
49+
if let text = result["text"] {
5050
self.outcome = text
5151
}
5252
} catch {

0 commit comments

Comments
 (0)