Skip to content

Commit

Permalink
Add explicit type (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller authored Mar 2, 2024
1 parent 7c8a041 commit 67dc8ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Layout/Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public final class Layout { // swiftlint:disable:this type_body_length
guard views.count >= 2,
let first: UIView = views.first
else { return self }
for view in views.dropFirst() {
for view: UIView in views.dropFirst() {
adding(view.constraints(to: attributes, of: first))
}
return self
Expand Down Expand Up @@ -567,13 +567,13 @@ public final class Layout { // swiftlint:disable:this type_body_length
switch direction {
case .leadingToTrailing:
var anchor: NSLayoutXAxisAnchor = first.trailing
for view in views.dropFirst() {
for view: UIView in views.dropFirst() {
adding(view.leading.constraint(to: anchor, constant: spacing).withPriority(priority))
anchor = view.trailing
}
case .leftToRight:
var anchor: NSLayoutXAxisAnchor = first.right
for view in views.dropFirst() {
for view: UIView in views.dropFirst() {
adding(view.left.constraint(to: anchor, constant: spacing).withPriority(priority))
anchor = view.right
}
Expand Down Expand Up @@ -611,7 +611,7 @@ public final class Layout { // swiftlint:disable:this type_body_length
let first: UIView = views.first
else { return self }
var anchor: NSLayoutYAxisAnchor = first.bottom
for view in views.dropFirst() {
for view: UIView in views.dropFirst() {
adding(view.top.constraint(to: anchor, constant: spacing).withPriority(priority))
anchor = view.bottom
}
Expand Down

0 comments on commit 67dc8ce

Please sign in to comment.