Skip to content

Commit a8ff124

Browse files
remove public access modifiers from package symbols
1 parent e7c3c34 commit a8ff124

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Sources/DocCDocumentation/DocCSymbolLink.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ package struct DocCSymbolLink: Sendable {
7979
}
8080

8181
extension DocCSymbolLink: Equatable {
82-
public static func == (lhs: DocCSymbolLink, rhs: DocCSymbolLink) -> Bool {
82+
package static func == (lhs: DocCSymbolLink, rhs: DocCSymbolLink) -> Bool {
8383
guard lhs.components.count == rhs.components.count else {
8484
return false
8585
}
@@ -100,7 +100,7 @@ extension DocCSymbolLink: Equatable {
100100
}
101101

102102
extension DocCSymbolLink: Hashable {
103-
public func hash(into hasher: inout Hasher) {
103+
package func hash(into hasher: inout Hasher) {
104104
for component in components {
105105
component.asLinkComponentString.hash(into: &hasher)
106106
}

Sources/DocCDocumentation/DoccDocumentationError.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
import Foundation
1414
package import LanguageServerProtocol
1515

16-
package enum DocCDocumentationError {
16+
package enum DocCDocumentationError: LocalizedError {
1717
case noDocumentation
1818
case indexNotAvailable
1919
case symbolNotFound(String)
2020

21-
public var message: String {
21+
var errorDescription: String? {
2222
switch self {
2323
case .noDocumentation:
2424
return "No documentation could be rendered for the position in this document"
@@ -32,6 +32,6 @@ package enum DocCDocumentationError {
3232

3333
package extension ResponseError {
3434
static func requestFailed(doccDocumentationError: DocCDocumentationError) -> ResponseError {
35-
return ResponseError.requestFailed(doccDocumentationError.message)
35+
return ResponseError.requestFailed(doccDocumentationError.localizedDescription)
3636
}
3737
}

Tests/SourceKitLSPTests/DoccDocumentationTests.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ fileprivate func renderDocumentation(
780780
}
781781
case .error(let error):
782782
XCTFail(
783-
"expected error \(error.message), but received a render node at position \(marker)",
783+
"expected error \(error.localizedDescription), but received a render node at position \(marker)",
784784
file: file,
785785
line: line
786786
)
@@ -803,8 +803,8 @@ fileprivate func renderDocumentation(
803803
)
804804
XCTAssertEqual(
805805
error.message,
806-
expectedError.message,
807-
"expected an error with message \(expectedError.message) at position \(marker)",
806+
expectedError.localizedDescription,
807+
"expected an error with message \(expectedError.localizedDescription) at position \(marker)",
808808
file: file,
809809
line: line
810810
)

0 commit comments

Comments
 (0)