Closed agarmu closed 3 years ago
Get rid of optional check. By changing the guard statement into a regular optional Int, error disappears. (guard let value : Int? = try JSONDecoder().decode(UserInput.self, from: jsonData).value else{ ) -> (let value : Int? = try JSONDecoder().decode(UserInput.self, from: jsonData).value)
Upon compilation, the following warning is issued by the Swift Compiler: