Skip to content

Commit 7e1f23d

Browse files
committed
renamed variables in slice(of:)
1 parent 3b9c1f8 commit 7e1f23d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SwiftSyntax/SyntaxText.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public struct SyntaxText {
100100
guard !self.isEmpty && !other.isEmpty else {
101101
return self.isEmpty && other.isEmpty
102102
}
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)
107107
}
108108

109109
/// Returns `true` if `other` is a substring of this ``SyntaxText``.

0 commit comments

Comments
 (0)