Merge pull request #233 from lorentey/PersistentSet-iterator-fix

[PersistentSet] Iterator.next(): Make inlinable
This commit is contained in:
Karoy Lorentey authored and GitHub committed 2022-10-31 14:35:57 -07:00
commit 1b53fc88d5
1 file changed
+1
@@ -30,6 +30,7 @@ extension PersistentSet: Sequence {
/// Once `nil` has been returned, all subsequent calls return `nil`.
///
/// - Complexity: O(1)
@inlinable
public mutating func next() -> Element? {
guard let (node, slot) = _it.next() else { return nil }
return _UnsafeHandle.read(node) { $0[item: slot].key }