/Expressible

Make it easier to conform to Swift Expressible protocols

Primary LanguageSwiftMIT LicenseMIT

Expressible

Make it easier to conform to Swift Standard Library Protocols

Do this

extension MyType: ExpressibleByStringLiteral {
    public init(stringLiteral value: String) {
        self.init(string: value)
    }
}

Not this

extension MyType: ExpressibleByStringLiteral {
    public init(stringLiteral value: String) {
        self.init(string: value)
    }
    
    public init(extendedGraphemeClusterLiteral value: StringLiteralType) {
        self.init(string: value)
    }
    
    public init(unicodeScalarLiteral value: ExtendedGraphemeClusterLiteralType) {
        self.init(string: value)
    }
}