Skip to content

Commit

Permalink
Add local variable to constrain method
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller committed Jan 18, 2024
1 parent 0fc265a commit 4f84ed0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/Layout/Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ public final class Layout { // swiftlint:disable:this type_body_length
to targetView: UIView,
inset: CGFloat = 0
) -> Layout {
constrain(view,
to: targetView,
insets: UIEdgeInsets(top: inset, left: inset, bottom: inset, right: inset))
let insets: UIEdgeInsets = .init(top: inset, left: inset, bottom: inset, right: inset)
return constrain(view, to: targetView, insets: insets)
}

@discardableResult
Expand Down

0 comments on commit 4f84ed0

Please sign in to comment.