From 556536859e1a6e792bcd9ce6bc8a50528606f1d8 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Mon, 26 Dec 2016 01:00:44 +1300 Subject: [PATCH] Fix bug in constraint maker duplicating constraints --- Source/ConstraintMaker.swift | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/Source/ConstraintMaker.swift b/Source/ConstraintMaker.swift index 022a60d..b20cdb5 100644 --- a/Source/ConstraintMaker.swift +++ b/Source/ConstraintMaker.swift @@ -175,25 +175,9 @@ public class ConstraintMaker { closure(maker) var constraints: [Constraint] = [] for description in maker.descriptions { - - guard let relation = description.relation, - let related = description.related, - let sourceLocation = description.sourceLocation else { - continue + guard let constraint = description.constraint else { + continue } - let from = ConstraintItem(target: description.item, attributes: description.attributes) - - let constraint = Constraint( - from: from, - to: related, - relation: relation, - sourceLocation: sourceLocation, - label: description.label, - multiplier: description.multiplier, - constant: description.constant, - priority: description.priority - ) - constraints.append(constraint) } for constraint in constraints {