Post

Replies

Boosts

Views

Activity

[async/await] Proper syntax for using async let with 2+ tuple declarations
async {       let request = URLRequest(url: URL(string: "https://google.com")!)       async let (data, status) = URLSession.shared.data(for: request)       try await print(status, data)     } This generates an error: Immutable variable status may only be initialized once. What's the proper syntax for using data and status separately when using async let?
0
0
608
Jun ’21