Skip to content

Commit 3920df7

Browse files
committed
Correct deprecation messages
1 parent 469ede0 commit 3920df7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Sources/System/FilePath/FilePathString.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extension FilePath {
4242

4343
@inlinable
4444
@_alwaysEmitIntoClient
45-
@available(*, deprecated, message: "Use FilePath(_: String) to create a path from a String.")
45+
@available(*, deprecated, message: "Use FilePath.init(_ scalar: Unicode.Scalar)")
4646
public init(platformString: inout CInterop.PlatformChar) {
4747
guard platformString == 0 else {
4848
fatalError(
@@ -54,7 +54,7 @@ extension FilePath {
5454

5555
@inlinable
5656
@_alwaysEmitIntoClient
57-
@available(*, deprecated, message: "Use FilePath(_: String) to create a path from a String.")
57+
@available(*, deprecated, message: "Use FilePath(_: String) to create a path from a String")
5858
public init(platformString: String) {
5959
if let nullLoc = platformString.firstIndex(of: "\0") {
6060
self = FilePath(String(platformString[..<nullLoc]))
@@ -132,7 +132,7 @@ extension FilePath.Component {
132132

133133
@inlinable
134134
@_alwaysEmitIntoClient
135-
@available(*, deprecated, message: "Use FilePath.Component.init(_: String).")
135+
@available(*, deprecated, message: "Use FilePath.Component.init(_ scalar: Unicode.Scalar)")
136136
public init?(platformString: inout CInterop.PlatformChar) {
137137
guard platformString == 0 else {
138138
fatalError(
@@ -144,7 +144,7 @@ extension FilePath.Component {
144144

145145
@inlinable
146146
@_alwaysEmitIntoClient
147-
@available(*, deprecated, message: "Use FilePath.Component.init(_: String).")
147+
@available(*, deprecated, message: "Use FilePath.Component.init(_: String)")
148148
public init?(platformString: String) {
149149
let string: String
150150
if let nullLoc = platformString.firstIndex(of: "\0") {
@@ -220,7 +220,7 @@ extension FilePath.Root {
220220

221221
@inlinable
222222
@_alwaysEmitIntoClient
223-
@available(*, deprecated, message: "Use FilePath.Root.init(_: String).")
223+
@available(*, deprecated, message: "Use FilePath.Root.init(_ scalar: Unicode.Scalar)")
224224
public init?(platformString: inout CInterop.PlatformChar) {
225225
guard platformString == 0 else {
226226
fatalError(
@@ -232,7 +232,7 @@ extension FilePath.Root {
232232

233233
@inlinable
234234
@_alwaysEmitIntoClient
235-
@available(*, deprecated, message: "Use FilePath.Root.init(_: String).")
235+
@available(*, deprecated, message: "Use FilePath.Root.init(_: String)")
236236
public init?(platformString: String) {
237237
let string: String
238238
if let nullLoc = platformString.firstIndex(of: "\0") {

Sources/System/PlatformString.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ extension String {
5151
}
5252
}
5353

54-
@available(*, deprecated, message: "Use String(_ scalar: Unicode.Scalar)")
5554
@inlinable
5655
@_alwaysEmitIntoClient
56+
@available(*, deprecated, message: "Use String.init(_ scalar: Unicode.Scalar)")
5757
public init(platformString: inout CInterop.PlatformChar) {
5858
guard platformString == 0 else {
5959
fatalError(
@@ -63,9 +63,9 @@ extension String {
6363
self = ""
6464
}
6565

66-
@available(*, deprecated, message: "Use a copy of the String argument")
6766
@inlinable
6867
@_alwaysEmitIntoClient
68+
@available(*, deprecated, message: "Use a copy of the String argument")
6969
public init(platformString: String) {
7070
if let nullLoc = platformString.firstIndex(of: "\0") {
7171
self = String(platformString[..<nullLoc])
@@ -117,9 +117,9 @@ extension String {
117117
self = string
118118
}
119119

120-
@available(*, deprecated, message: "Use String(_ scalar: Unicode.Scalar)")
121120
@inlinable
122121
@_alwaysEmitIntoClient
122+
@available(*, deprecated, message: "Use String(_ scalar: Unicode.Scalar)")
123123
public init?(
124124
validatingPlatformString platformString: inout CInterop.PlatformChar
125125
) {
@@ -131,9 +131,9 @@ extension String {
131131
self = ""
132132
}
133133

134-
@available(*, deprecated, message: "Use a copy of the String argument")
135134
@inlinable
136135
@_alwaysEmitIntoClient
136+
@available(*, deprecated, message: "Use a copy of the String argument")
137137
public init?(
138138
validatingPlatformString platformString: String
139139
) {

0 commit comments

Comments
 (0)