Skip to content

Commit dc59e96

Browse files
committed
removed redundant variable
1 parent ff95302 commit dc59e96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/SwiftSyntax/SyntaxText.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ public struct SyntaxText {
100100
guard !self.isEmpty && !other.isEmpty else {
101101
return self.isEmpty && other.isEmpty
102102
}
103-
let isSelfBaseAddressBiggerThanOther: Bool = other.baseAddress! <= self.baseAddress!
104103
let selfEndBound = UnsafePointer<UInt8>(self.baseAddress! + count)
105104
let otherEndBound = UnsafePointer<UInt8>(other.baseAddress! + other.count)
106-
return (isSelfBaseAddressBiggerThanOther && selfEndBound <= otherEndBound)
105+
return (other.baseAddress! <= self.baseAddress!) && (selfEndBound <= otherEndBound)
107106
}
108107

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

0 commit comments

Comments
 (0)