Skip to content

Commit 11a7d83

Browse files
author
Niclas Kristek
committed
Add ExpressibleByNilLiteral constraint on OptionalProtocol
Optional already implements this and this makes it possible to just write nil instead of .init(reconstructing: nil)
1 parent 2260221 commit 11a7d83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Optional.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
/// An optional protocol for use in type constraints.
10-
public protocol OptionalProtocol {
10+
public protocol OptionalProtocol: ExpressibleByNilLiteral {
1111
/// The type contained in the otpional.
1212
associatedtype Wrapped
1313

0 commit comments

Comments
 (0)