Skip to content

Commit 912cfbf

Browse files
committed
Remove LosslessStringConvertible conformance
1 parent 566a08e commit 912cfbf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Sources/PackageModel/PackageIdentity.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,22 @@ public var _useLegacyIdentities: Bool = true {
2323
}
2424
}
2525

26-
internal protocol PackageIdentityProvider: LosslessStringConvertible {
26+
internal protocol PackageIdentityProvider: CustomStringConvertible {
2727
init(_ string: String)
2828
}
2929

3030
/// The canonical identifier for a package, based on its source location.
31-
public struct PackageIdentity: LosslessStringConvertible, Hashable {
31+
public struct PackageIdentity: Hashable, CustomStringConvertible {
3232
internal static var provider: PackageIdentityProvider.Type = LegacyPackageIdentity.self
3333

3434
/// A textual representation of this instance.
3535
public let description: String
3636

37-
/// Instantiates an instance of the conforming type from a string representation.
38-
public init(_ string: String) {
39-
self.description = Self.provider.init(string).description
37+
38+
/// Creates a package identity from a URL.
39+
/// - Parameter url: The package's URL.
40+
public init(_ url: String) {
41+
self.description = Self.provider.init(url).description
4042
}
4143
}
4244

0 commit comments

Comments
 (0)