File tree Expand file tree Collapse file tree 2 files changed +1
-24
lines changed
Sources/GoodNetworking/Resource Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -10,24 +10,18 @@ let package = Package(
1010 . macOS( . v10_15)
1111 ] ,
1212 products: [
13- // Products define the executables and libraries a package produces, and make them visible to other packages.
1413 . library(
1514 name: " GoodNetworking " ,
1615 targets: [ " GoodNetworking " ]
1716 )
1817 ] ,
1918 dependencies: [
2019 // Dependencies declare other packages that this package depends on.
21- . package ( url: " https://github.com/KittyMac/Sextant.git " , . upToNextMinor( from: " 0.4.31 " ) )
2220 ] ,
2321 targets: [
24- // Targets are the basic building blocks of a package. A target can define a module or a test suite.
25- // Targets can depend on other targets in this package, and on products in packages this package depends on.
2622 . target(
2723 name: " GoodNetworking " ,
28- dependencies: [
29- . product( name: " Sextant " , package : " Sextant " )
30- ] ,
24+ dependencies: [ ] ,
3125 path: " ./Sources/GoodNetworking " ,
3226 resources: [ . copy( " PrivacyInfo.xcprivacy " ) ] ,
3327 swiftSettings: [
Original file line number Diff line number Diff line change 66//
77
88import Foundation
9- import Hitch
10- import Sextant
119
1210// MARK: - Creatable
1311
@@ -245,21 +243,6 @@ public protocol Query: Readable where ReadResponse == Data {
245243
246244}
247245
248- public extension Query where Resource: Decodable {
249-
250- /// Provides a default implementation for parsing the raw response data into a `Resource` using the query.
251- ///
252- /// This method uses the specified query to extract and decode the data from the response.
253- ///
254- /// - Parameter response: The raw response data received from the server.
255- /// - Returns: The decoded `Resource` object.
256- /// - Throws: A `NetworkError` if the parsing or decoding fails.
257- nonisolated static func resource( from response: ReadResponse , updating resource: Resource ? ) throws ( NetworkError) -> Resource {
258- Sextant . shared. query ( response, values: Hitch ( string: query ( ) ) ) ?? . placeholder
259- }
260-
261- }
262-
263246public extension Query {
264247
265248 /// Reads the raw data from the remote server using the provided session and request data.
You can’t perform that action at this time.
0 commit comments