File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Sources/SwiftParser/Lexer Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ extension UInt8 {
249
249
250
250
/// Allows direct comparisons between UInt8 and double quoted literals.
251
251
extension UInt8 {
252
- /// Basic comparison operators
252
+ /// Basic equality operators
253
253
@inline ( __always)
254
254
public static func == ( i: Self , s: Unicode . Scalar ) -> Bool {
255
255
return i == UInt8 ( ascii: s)
@@ -269,15 +269,15 @@ extension UInt8? {
269
269
/// Basic equality operators
270
270
@inline ( __always)
271
271
public static func == ( i: Self , s: Unicode . Scalar ) -> Bool {
272
- return i == nil ? false : i! == UInt8 ( ascii: s)
272
+ return i == UInt8 ( ascii: s)
273
273
}
274
274
@inline ( __always)
275
275
public static func != ( i: Self , s: Unicode . Scalar ) -> Bool {
276
- return i == nil ? true : i! != UInt8 ( ascii: s)
276
+ return i != UInt8 ( ascii: s)
277
277
}
278
278
/// Used in switch statements
279
279
@inline ( __always)
280
280
public static func ~= ( s: Unicode . Scalar , i: Self ) -> Bool {
281
- return i == nil ? false : i! == UInt8 ( ascii: s)
281
+ return i == UInt8 ( ascii: s)
282
282
}
283
283
}
You can’t perform that action at this time.
0 commit comments