diff --git a/Sources/OrderedCollections/OrderedSet/OrderedSet+Diffing.swift b/Sources/OrderedCollections/OrderedSet/OrderedSet+Diffing.swift index 7c91a6c0..3724d0fa 100644 --- a/Sources/OrderedCollections/OrderedSet/OrderedSet+Diffing.swift +++ b/Sources/OrderedCollections/OrderedSet/OrderedSet+Diffing.swift @@ -93,9 +93,8 @@ extension OrderedSet { /// is the number of changes contained by the parameter. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func applying(_ difference: CollectionDifference) -> Self? { - guard let array = Array(self).applying(difference) else { return nil } + guard let array = self.elements.applying(difference) else { return nil } let result = OrderedSet(array) return result.count == array.count ? result : nil } } -