From ecb7a62501d42a7f01a82c2fcc7c1fce49fe8208 Mon Sep 17 00:00:00 2001 From: Charles Pisciotta Date: Fri, 8 Nov 2024 21:07:30 -0500 Subject: [PATCH] Delete Unused CaptureGroup Pattern Properties (#331) --- Sources/XcbeautifyLib/CaptureGroups.swift | 5 ----- Sources/XcbeautifyLib/XCRegex.swift | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Sources/XcbeautifyLib/CaptureGroups.swift b/Sources/XcbeautifyLib/CaptureGroups.swift index 6d1d04a3..f0cd2d16 100644 --- a/Sources/XcbeautifyLib/CaptureGroups.swift +++ b/Sources/XcbeautifyLib/CaptureGroups.swift @@ -10,11 +10,6 @@ package extension CaptureGroup { var outputType: OutputType { Self.outputType } } -extension CaptureGroup { - static var pattern: String { regex.pattern } - var pattern: String { Self.regex.pattern } -} - protocol ErrorCaptureGroup: CaptureGroup { var wholeError: String { get } } diff --git a/Sources/XcbeautifyLib/XCRegex.swift b/Sources/XcbeautifyLib/XCRegex.swift index 5cc32f46..bcd57e2e 100644 --- a/Sources/XcbeautifyLib/XCRegex.swift +++ b/Sources/XcbeautifyLib/XCRegex.swift @@ -3,7 +3,7 @@ import Foundation // `NSRegularExpression` is marked as `@unchecked Sendable`. // Match the definition here. package final class XCRegex: @unchecked Sendable { - let pattern: String + private let pattern: String private lazy var regex: NSRegularExpression? = { let regex = try? NSRegularExpression(pattern: "^" + pattern, options: [.caseInsensitive])