mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[XcodeGen] Make 'Byte' comform 'ExpressibleByUnicodeScalarLiteral'
Instead of comparing with 'UnicodeScalar', construct 'Byte' from literals and compare with them. Make it less evil :)
This commit is contained in:
@@ -77,10 +77,6 @@ struct ByteScanner {
|
||||
tryEat(where: { $0 == byte })
|
||||
}
|
||||
|
||||
mutating func tryEat(_ c: UnicodeScalar) -> Bool {
|
||||
tryEat(where: { $0 == c })
|
||||
}
|
||||
|
||||
mutating func tryEat<S: Sequence>(_ seq: S) -> Bool where S.Element == UInt8 {
|
||||
let start = cursor
|
||||
for byte in seq {
|
||||
|
||||
Reference in New Issue
Block a user