Skip to content

Commit

Permalink
renamed variables in slice(of:)
Browse files Browse the repository at this point in the history
  • Loading branch information
art-divin committed Oct 23, 2023
1 parent 3b9c1f8 commit 7e1f23d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/SwiftSyntax/SyntaxText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ public struct SyntaxText {
guard !self.isEmpty && !other.isEmpty else {
return self.isEmpty && other.isEmpty
}
let first: Bool = other.baseAddress! <= self.baseAddress!
let second = UnsafePointer<UInt8>(self.baseAddress! + count)
let third = UnsafePointer<UInt8>(other.baseAddress! + other.count)
return (first && second <= third)
let doesOtherIncludeSelfBaseAddress: Bool = other.baseAddress! <= self.baseAddress!
let sendEndBound = UnsafePointer<UInt8>(self.baseAddress! + count)
let otherEndBound = UnsafePointer<UInt8>(other.baseAddress! + other.count)
return (doesOtherIncludeSelfBaseAddress && sendEndBound <= otherEndBound)
}

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

0 comments on commit 7e1f23d

Please sign in to comment.