@@ -61,7 +61,7 @@ public final class RegistryManager {
61
61
on queue: DispatchQueue ,
62
62
completion: @escaping ( Result < [ Version ] , Error > ) -> Void
63
63
) {
64
- guard case let ( scope, name) ? = package . scopeAndName else {
64
+ guard case let ( scope, name) ? = package . identity . scopeAndName else {
65
65
return completion ( . failure( RegistryError . invalidPackage ( package ) ) )
66
66
}
67
67
@@ -109,7 +109,7 @@ public final class RegistryManager {
109
109
on queue: DispatchQueue ,
110
110
completion: @escaping ( Result < Manifest , Error > ) -> Void
111
111
) {
112
- guard case let ( scope, name) ? = package . scopeAndName else {
112
+ guard case let ( scope, name) ? = package . identity . scopeAndName else {
113
113
return completion ( . failure( RegistryError . invalidPackage ( package ) ) )
114
114
}
115
115
@@ -187,7 +187,7 @@ public final class RegistryManager {
187
187
on queue: DispatchQueue ,
188
188
completion: @escaping ( Result < Void , Error > ) -> Void
189
189
) {
190
- guard case let ( scope, name) ? = package . scopeAndName else {
190
+ guard case let ( scope, name) ? = package . identity . scopeAndName else {
191
191
return completion ( . failure( RegistryError . invalidPackage ( package ) ) )
192
192
}
193
193
@@ -271,16 +271,3 @@ private extension AbsolutePath {
271
271
return AbsolutePath ( self , RelativePath ( " .. " ) ) . appending ( component: " \( basename) . \( `extension`) " )
272
272
}
273
273
}
274
-
275
- // FIXME: Implement in PackageIdentity
276
- private extension PackageReference {
277
- var scopeAndName : ( String , String ) ? {
278
- let components = identity. description. split ( separator: " . " , maxSplits: 1 , omittingEmptySubsequences: true )
279
- guard let scope = components. first,
280
- let name = components. last,
281
- components. count == 2
282
- else { return nil }
283
-
284
- return ( String ( scope) , String ( name) )
285
- }
286
- }
0 commit comments