Skip to content

Commit

Permalink
Replace guard with Swift 5.9 if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
d4r1091 committed Oct 9, 2023
1 parent cdc5aea commit cdd2088
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Client/Ecosia/UI/PageAction/PageActionMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,7 @@ extension PageActionMenu: UITableViewDataSource, UITableViewDelegate {
}

func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
guard section == 0 else {
return 0
}
return UITableView.automaticDimension
return if section == 0 { 0 } else { UITableView.automaticDimension }
}

func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
Expand Down

0 comments on commit cdd2088

Please sign in to comment.