From c80e4eebe2e9ee3c87f6dbe4eae2c4614b4bfc6e Mon Sep 17 00:00:00 2001 From: Nihal Erdal Date: Wed, 26 May 2021 17:28:01 -0700 Subject: [PATCH] fixed issue #7 - Silence warnings for unused return type in taskForGETRequest. - https://github.com/udacity/ios-nd-networking/issues/7 --- TheMovieManager/Model/TMDB Client/TMDBClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TheMovieManager/Model/TMDB Client/TMDBClient.swift b/TheMovieManager/Model/TMDB Client/TMDBClient.swift index ed6e33d..6b8fdf7 100644 --- a/TheMovieManager/Model/TMDB Client/TMDBClient.swift +++ b/TheMovieManager/Model/TMDB Client/TMDBClient.swift @@ -57,7 +57,7 @@ class TMDBClient { } - class func taskForGETRequest(url: URL, responseType: ResponseType.Type, completion: @escaping (ResponseType?, Error?) -> Void) -> URLSessionTask{ + @discardableResult class func taskForGETRequest(url: URL, responseType: ResponseType.Type, completion: @escaping (ResponseType?, Error?) -> Void) -> URLSessionTask{ let task = URLSession.shared.dataTask(with: url) { data, response, error in guard let data = data else {