Skip to content

Commit

Permalink
Merge pull request #9 from cwalo/cw/swift-3-tweak
Browse files Browse the repository at this point in the history
Make constraint returned from addToView discardable. Thx @cwalo, you da real MVC.
  • Loading branch information
drewyeaton authored Jan 17, 2017
2 parents 28a2d16 + a0f8c34 commit 661d714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Restraint/Restraint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public struct Restraint {
)
}

public func addToView(_ view: UIView) -> NSLayoutConstraint {
@discardableResult public func addToView(_ view: UIView) -> NSLayoutConstraint {
let constraint = self.constraint()

if let leftView = leftItem as? UIView {
Expand Down

0 comments on commit 661d714

Please sign in to comment.