File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Sources/DangerDependenciesResolver Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ extension Package.Pinned {
39
39
}
40
40
}
41
41
42
- // MARK: swift-tools-version >= 5.6
42
+ // MARK: - swift-tools-version >= 5.6
43
43
extension Package {
44
44
struct PinnedV2 : Decodable , Equatable {
45
45
let name : String
@@ -63,7 +63,7 @@ extension Package.PinnedV2 {
63
63
}
64
64
65
65
extension Package . PinnedV2 {
66
- func convertToV1 ( ) -> Package . Pinned {
66
+ var v1 : Package . Pinned {
67
67
. init(
68
68
name: name,
69
69
url: url,
@@ -72,8 +72,9 @@ extension Package.PinnedV2 {
72
72
}
73
73
}
74
74
75
+ // MARK: -
75
76
extension Sequence where Element == Package . PinnedV2 {
76
- func convertToV1 ( ) -> [ Package . Pinned ] {
77
- map { $0 . convertToV1 ( ) }
77
+ func v1Converted ( ) -> [ Package . Pinned ] {
78
+ map ( \ . v1 )
78
79
}
79
80
}
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ struct PackageDataProvider: PackageDataProviding {
96
96
case let . v1( object) :
97
97
return object. pins
98
98
case let . v2( pins) :
99
- return pins. convertToV1 ( )
99
+ return pins. v1Converted ( )
100
100
}
101
101
}
102
102
You can’t perform that action at this time.
0 commit comments