From 80195a8374da3b1acdec7cb993d972459fd1ec2d Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Sun, 6 Nov 2022 12:31:16 -0800 Subject: [PATCH] [PersistentSet] Add fixmes for in-place reductions --- .../PersistentSet+SetAlgebra formIntersection.swift | 2 ++ .../PersistentSet/PersistentSet+SetAlgebra subtract.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra formIntersection.swift b/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra formIntersection.swift index 466169dc..f00776de 100644 --- a/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra formIntersection.swift +++ b/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra formIntersection.swift @@ -30,6 +30,7 @@ extension PersistentSet { /// parts of the input trees directly into the result. @inlinable public mutating func formIntersection(_ other: Self) { + // FIXME: Implement in-place reductions self = intersection(other) } @@ -51,6 +52,7 @@ extension PersistentSet { public mutating func formIntersection( _ other: PersistentDictionary.Keys ) { + // FIXME: Implement in-place reductions self = intersection(other) } diff --git a/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra subtract.swift b/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra subtract.swift index 6463d527..10bca4a6 100644 --- a/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra subtract.swift +++ b/Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra subtract.swift @@ -26,6 +26,7 @@ extension PersistentSet { /// parts of the input trees directly into the result. @inlinable public mutating func subtract(_ other: Self) { + // FIXME: Implement in-place reductions self = subtracting(other) } @@ -48,6 +49,7 @@ extension PersistentSet { public mutating func subtract( _ other: PersistentDictionary.Keys ) { + // FIXME: Implement in-place reductions self = subtracting(other) }