Skip to content

Commit

Permalink
Add explicit type (#344)
Browse files Browse the repository at this point in the history
* Add explicit type

* Add explicit type
  • Loading branch information
tinder-cfuller authored Feb 22, 2024
1 parent 2a2d4c6 commit 7eaa09a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Sources/Layout/Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public final class Layout { // swiftlint:disable:this type_body_length
_ views: [UIView]
) -> Layout {
guard views.count >= 2,
let first = views.first
let first: UIView = views.first
else { return self }
for view in views.dropFirst() {
adding(view.constraints(to: attributes, of: first))
Expand Down Expand Up @@ -587,7 +587,7 @@ public final class Layout { // swiftlint:disable:this type_body_length
alignment: YAxisAttribute...
) -> Layout {
guard views.count >= 2,
let first = views.first
let first: UIView = views.first
else { return self }
switch direction {
case .leadingToTrailing:
Expand Down Expand Up @@ -633,7 +633,7 @@ public final class Layout { // swiftlint:disable:this type_body_length
alignment: XAxisAttribute...
) -> Layout {
guard views.count >= 2,
let first = views.first
let first: UIView = views.first
else { return self }
var anchor: NSLayoutYAxisAnchor = first.bottom
for view in views.dropFirst() {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Layout/LayoutItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ extension LayoutItem {
and trailing: NSLayoutXAxisAnchor
) -> LayoutItem {
addingSuperviewConstraints { layoutItem in
if let superview = layoutItem.layoutItemView.superview {
if let superview: UIView = layoutItem.layoutItemView.superview {
let guide: UILayoutGuide = {
let guide: UILayoutGuide = .init()
superview.addLayoutGuide(guide)
Expand Down Expand Up @@ -399,7 +399,7 @@ extension LayoutItem {
and bottom: NSLayoutYAxisAnchor
) -> LayoutItem {
addingSuperviewConstraints { layoutItem in
if let superview = layoutItem.layoutItemView.superview {
if let superview: UIView = layoutItem.layoutItemView.superview {
let guide: UILayoutGuide = {
let guide: UILayoutGuide = .init()
superview.addLayoutGuide(guide)
Expand Down

0 comments on commit 7eaa09a

Please sign in to comment.