From 70f42c14b3b955cf4d1e8936611dfecda160f848 Mon Sep 17 00:00:00 2001 From: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Fri, 10 May 2019 15:01:56 +0200 Subject: [PATCH] Make playground run again --- UsageExamples.playground/Contents.swift | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/UsageExamples.playground/Contents.swift b/UsageExamples.playground/Contents.swift index a1a2e5b..9fb7fcf 100644 --- a/UsageExamples.playground/Contents.swift +++ b/UsageExamples.playground/Contents.swift @@ -73,9 +73,9 @@ myString.clamped(to: ..."c") //: ### clamp(to:) //: In-place `mutating` variant of `clamped(to:)` -var myNum = 3 -myNum.clamp(to: 0 ... 2) -myNum +var myNum2 = 3 +myNum2.clamp(to: 0 ... 2) +myNum2 //: ## StringExtension //: ### string.strip @@ -371,8 +371,12 @@ print(weak) //: `Unowned` is a wrapper to store unowned references to a `Wrapped` instance. //: ### Unowned(_:) //: Initialize with an object reference. -var unowned = Unowned(text) -print(unowned) + +// This is commented out as there's a bug with Swift playgrounds that would cause a crash if these lines weren't commented. +// See https://github.com/Flinesoft/HandySwift/issues/24 for reference. + +// var unowned = Unowned(text) +// print(unowned) //: ## Withable //: Simple protocol to make constructing and modifying objects with multiple properties more pleasant (functional, chainable, point-free).