From 6a954f553c974ea0983cf4f9201d645e20401243 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 30 Jun 2023 14:27:26 -0700 Subject: [PATCH] Revert "Try using withContiguousStorageIfAvailable in RangeReplaceableCollection.append(contentsOf:) before falling back to a slow element-by-element loop. Fixes rdar://109059874" This reverts commit 465aa22b81d96514f1813787fdfe9f23375deadc. --- stdlib/public/core/RangeReplaceableCollection.swift | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/stdlib/public/core/RangeReplaceableCollection.swift b/stdlib/public/core/RangeReplaceableCollection.swift index 44c0df62aa7e5..fe5397d6aca34 100644 --- a/stdlib/public/core/RangeReplaceableCollection.swift +++ b/stdlib/public/core/RangeReplaceableCollection.swift @@ -453,15 +453,10 @@ extension RangeReplaceableCollection { @inlinable public mutating func append(contentsOf newElements: __owned S) where S.Element == Element { - - let done:Void? = newElements.withContiguousStorageIfAvailable { - replaceSubrange(endIndex..