From 93a20a756ad8a0c0a8ba0ceeb9090463b495105f Mon Sep 17 00:00:00 2001 From: Chris Lee <86325581+joonchrislee@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:49:48 -0700 Subject: [PATCH] refactor: suppress warning --- Sources/TokenTextView/TokenTextView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TokenTextView/TokenTextView.swift b/Sources/TokenTextView/TokenTextView.swift index ce7270f..860492a 100644 --- a/Sources/TokenTextView/TokenTextView.swift +++ b/Sources/TokenTextView/TokenTextView.swift @@ -289,7 +289,7 @@ final class TokenTextView: UITextView { guard let self = self else { return false } return self.selectedRange.lowerBound <= $0.range.lowerBound && $0.range.upperBound <= self.selectedRange.upperBound } - guard let copiedTokenInstances = tokenInstances.filter(filterCondition).map({ $0.copy() as? TokenInstance }) as? [TokenInstance] else { + guard let copiedTokenInstances = tokenInstances.filter(filterCondition).map({ $0.copy() }) as? [TokenInstance] else { print("Could not get filtered token instances as [TokenInstance]") return }