Review error handling

This commit is contained in:
Karoy Lorentey committed 2026-06-17 18:24:03 -07:00
1 parent 85cdb77d25
commit bced34defa
16 files changed
+148 -126

No files matched your search

@@ -96,12 +96,13 @@ extension UniqueSet where Element: Copyable {
#if UnstableContainersPreview
@_alwaysEmitIntoClient
public init<
S: Iterable_<Element, Never> & Sequence<Element>
S: Iterable_ & Sequence<Element>
>(
copying items: borrowing S
) {
) throws(S.Failure_)
where S.Element_ == Element {
self.init()
self._insert(copying: items)
try self._insert(copying: items)
}
#endif
}
@@ -173,11 +173,12 @@ extension UniqueSet /* where Element: Copyable */ {
@_alwaysEmitIntoClient
@inline(__always)
public mutating func insert<
S: Iterable_<Element, Never> & Sequence<Element>
S: Iterable_ & Sequence<Element>
>(
copying items: borrowing S
) {
_insert(copying: items)
) throws(S.Failure_)
where S.Element_ == Element {
try _insert(copying: items)
}
#endif
}