Add subscript requirements to [Mutable]Container with borrow/mutate accessors

This commit is contained in:
Karoy Lorentey committed 2026-06-22 20:10:22 -07:00
1 parent 22a94a9756
commit e8b09ade25
11 files changed
+59 -41

No files matched your search

@@ -59,10 +59,8 @@ extension UniqueSet where Element: ~Copyable {
@inlinable
public subscript(index: Index) -> Element {
// FIXME: Use borrow accessor here
unsafeAddress {
_checkItemIndex(index)
return .init(_storage._memberPtr(at: index._bucket))
borrow {
_storage[index]
}
}
}