iOS Swift - Networking
Identify the error in the following Swift code for loading an image from a URL:
let url = URL(string: "https://example.com/image.png")
URLSession.shared.dataTask(with: url!) { data, response, error in
let image = UIImage(data: data!)
imageView.image = image
}.resume()