Skip to content

Commit

Permalink
Annotate with @discardableResult
Browse files Browse the repository at this point in the history
  • Loading branch information
markmur committed Mar 7, 2024
1 parent 5031c70 commit 57ee060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Samples/SwiftUIExample/SwiftUIExample/CatalogView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ struct CatalogView: View {
}
ToolbarItemGroup {
BadgeButton(badgeCount: Int(cartManager.cart?.totalQuantity ?? 0), action: {
isShowingCart = true
})
.accessibilityIdentifier("cartIcon")
isShowingCart = true
})
.accessibilityIdentifier("cartIcon")

Button(action: {
onAppear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public func preload(checkout url: URL) {
}

/// Presents the checkout from a given `UIViewController`.
@discardableResult
public func present(checkout url: URL, from: UIViewController, delegate: CheckoutDelegate? = nil) -> CheckoutViewController {
let viewController = CheckoutViewController(checkout: url, delegate: delegate)
from.present(viewController, animated: true)
Expand Down

0 comments on commit 57ee060

Please sign in to comment.