From 222e14ab374cfda30285cae6c1bb93a635f44526 Mon Sep 17 00:00:00 2001 From: Vitalii Budnik Date: Mon, 10 Jun 2019 15:33:33 +0300 Subject: [PATCH] Make ConstraintViewDSL content priorities nonmutating (#586) --- Source/ConstraintViewDSL.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/ConstraintViewDSL.swift b/Source/ConstraintViewDSL.swift index 298bdb1..a0187f9 100644 --- a/Source/ConstraintViewDSL.swift +++ b/Source/ConstraintViewDSL.swift @@ -55,7 +55,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentHuggingPriority(for: .horizontal).rawValue } - set { + nonmutating set { self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal) } } @@ -64,7 +64,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentHuggingPriority(for: .vertical).rawValue } - set { + nonmutating set { self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .vertical) } } @@ -73,7 +73,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentCompressionResistancePriority(for: .horizontal).rawValue } - set { + nonmutating set { self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .horizontal) } } @@ -82,7 +82,7 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { get { return self.view.contentCompressionResistancePriority(for: .vertical).rawValue } - set { + nonmutating set { self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .vertical) } }