Skip to content

Commit 344c92b

Browse files
Optimizations
1 parent 4274a0f commit 344c92b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Tests/TestHelpers/TestHelpers.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private let info: PlatformInfo = {
4646
// swiftlint:disable file_length
4747

4848
private let violationMarker = ""
49+
private let violationMarkerChar = violationMarker.first!
4950

5051
private extension SwiftLintFile {
5152
static func testFile(withContents contents: String, persistToDisk: Bool = false) -> SwiftLintFile {
@@ -198,9 +199,6 @@ public extension Collection where Element == Example {
198199
}
199200

200201
private func cleanedContentsAndMarkerOffsets(from contents: String) -> (String, [Int]) {
201-
guard let violationMarkerChar = violationMarker.first else {
202-
return (contents, [])
203-
}
204202
var markerOffsets = [Int]()
205203
var cleanedContents = ""
206204
cleanedContents.reserveCapacity(contents.count)

0 commit comments

Comments
 (0)