File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ public struct SyntaxText {
100
100
guard !self . isEmpty && !other. isEmpty else {
101
101
return self . isEmpty && other. isEmpty
102
102
}
103
- let first : Bool = other. baseAddress! <= self . baseAddress!
104
- let second = UnsafePointer < UInt8 > ( self . baseAddress! + count)
105
- let third = UnsafePointer < UInt8 > ( other. baseAddress! + other. count)
106
- return ( first && second <= third )
103
+ let doesOtherIncludeSelfBaseAddress : Bool = other. baseAddress! <= self . baseAddress!
104
+ let sendEndBound = UnsafePointer < UInt8 > ( self . baseAddress! + count)
105
+ let otherEndBound = UnsafePointer < UInt8 > ( other. baseAddress! + other. count)
106
+ return ( doesOtherIncludeSelfBaseAddress && sendEndBound <= otherEndBound )
107
107
}
108
108
109
109
/// Returns `true` if `other` is a substring of this ``SyntaxText``.
You can’t perform that action at this time.
0 commit comments