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])