Skip to content

Commit 2759a71

Browse files
authored
[stdlib] OptionSet: Remove the primary associated type declaration
`Element` is expected to always be `Self`. `RawValue` would be a better choice for the primary type ("option set of UInt32"), but to avoid confusion, it seems better to just omit the declaration, at least for now.
1 parent 1df918e commit 2759a71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/OptionSet.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
/// print("Add more to your cart for free priority shipping!")
8484
/// }
8585
/// // Prints "You've earned free priority shipping!"
86-
public protocol OptionSet<Element>: SetAlgebra, RawRepresentable {
86+
public protocol OptionSet: SetAlgebra, RawRepresentable {
8787
// We can't constrain the associated Element type to be the same as
8888
// Self, but we can do almost as well with a default and a
8989
// constrained extension

0 commit comments

Comments
 (0)