Skip to content

Commit

Permalink
Fix issue udacity#7 of moviemanagerchallenge
Browse files Browse the repository at this point in the history
Silence warnings for unused return type in taskForGETRequest.
  • Loading branch information
AsmaHero authored Jun 5, 2019
1 parent 6d5e2f7 commit f64f578
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TMDBClient {
}
}

class func taskForGETRequest<ResponseType: Decodable>(url: URL, responseType: ResponseType.Type, completion: @escaping (ResponseType?, Error?) -> Void) -> URLSessionDataTask {
@discardableResult class func taskForGETRequest<ResponseType: Decodable>(url: URL, responseType: ResponseType.Type, completion: @escaping (ResponseType?, Error?) -> Void) -> URLSessionDataTask {
let task = URLSession.shared.dataTask(with: url) { data, response, error in
guard let data = data else {
DispatchQueue.main.async {
Expand Down

0 comments on commit f64f578

Please sign in to comment.