Using Result type with async/await

You don't have to nest the success handling.

let products: [Product]
switch result {
    case .success(let p):
        products = p
    case .failure(let error):
        // handle error
        return
}

// handle success