@@ -135,11 +135,11 @@ public class ToolsVersionLoader: ToolsVersionLoaderProtocol {
135
135
/// The version specifier is missing.
136
136
case missingVersionSpecifier
137
137
/// The comment marker is malformed.
138
- case commentMarker( _ commentMarker: Substring )
138
+ case commentMarker( _ commentMarker: String )
139
139
/// The label part of the Swift tools version specification is malformed.
140
- case label( _ label: Substring )
140
+ case label( _ label: String )
141
141
/// The version specifier is malformed.
142
- case versionSpecifier( _ versionSpecifier: Substring )
142
+ case versionSpecifier( _ versionSpecifier: String )
143
143
}
144
144
145
145
/// Details of backward-incompatible contents with Swift tools version ≤ 5.3.
@@ -339,11 +339,11 @@ public class ToolsVersionLoader: ToolsVersionLoaderProtocol {
339
339
340
340
guard toolsVersionSpecificationComponents. everythingUpToVersionSpecifierIsWellFormed else {
341
341
if commentMarker != " // " {
342
- throw Error . malformedToolsVersionSpecification ( . commentMarker( commentMarker) )
342
+ throw Error . malformedToolsVersionSpecification ( . commentMarker( String ( commentMarker) ) )
343
343
}
344
344
345
345
if label. lowercased ( ) != " swift-tools-version: " {
346
- throw Error . malformedToolsVersionSpecification ( . label( label) )
346
+ throw Error . malformedToolsVersionSpecification ( . label( String ( label) ) )
347
347
}
348
348
349
349
// The above If-statements should have covered all possible malformations in Swift tools version specification up to the version specifier.
@@ -352,7 +352,7 @@ public class ToolsVersionLoader: ToolsVersionLoaderProtocol {
352
352
}
353
353
354
354
guard let version = ToolsVersion ( string: String ( versionSpecifier) ) else {
355
- throw Error . malformedToolsVersionSpecification ( . versionSpecifier( versionSpecifier) )
355
+ throw Error . malformedToolsVersionSpecification ( . versionSpecifier( String ( versionSpecifier) ) )
356
356
}
357
357
358
358
guard version > . v5_3 || manifestComponents. isCompatibleWithPreSwift5_3_1 else {
0 commit comments