Skip to content

Commit c9cdef3

Browse files
committed
Replace Decodable to Himotoki.Decodable
1 parent f46005f commit c9cdef3

5 files changed

+6
-6
lines changed

Pagination/GitHubRequest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extension GitHubRequest {
1313
}
1414
}
1515

16-
extension GitHubRequest where Response: Decodable {
16+
extension GitHubRequest where Response: Himotoki.Decodable {
1717
func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response {
1818
return try decodeValue(object)
1919
}

Pagination/PaginationResponse.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
import Himotoki
33

4-
struct SearchResponse<Element: Decodable>: PaginationResponse {
4+
struct SearchResponse<Element: Himotoki.Decodable>: PaginationResponse {
55
let elements: [Element]
66
let page: Int
77
let nextPage: Int?

Pagination/PaginationResponseType.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import Foundation
22
import Himotoki
33

44
protocol PaginationResponse {
5-
associatedtype Element: Decodable
5+
associatedtype Element: Himotoki.Decodable
66
var elements: [Element] { get }
77
var page: Int { get }
88
var nextPage: Int? { get }
99
init(elements: [Element], page: Int, nextPage: Int?)
1010
}
1111

12-
struct AnyPaginationResponse<Element: Decodable>: PaginationResponse {
12+
struct AnyPaginationResponse<Element: Himotoki.Decodable>: PaginationResponse {
1313
let elements: [Element]
1414
let page: Int
1515
let nextPage: Int?

Pagination/PaginationViewModel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import APIKit
55
import Action
66
import Himotoki
77

8-
class PaginationViewModel<Element: Decodable> {
8+
class PaginationViewModel<Element: Himotoki.Decodable> {
99
let indicatorViewAnimating: Driver<Bool>
1010
let elements: Driver<[Element]>
1111
let loadError: Driver<Error>

Pagination/Repository.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
import Himotoki
33

4-
struct Repository: Decodable {
4+
struct Repository: Himotoki.Decodable {
55
let id: Int
66
let fullName: String
77
let stargazersCount: Int

0 commit comments

Comments
 (0)