I have a network request, but I don't really care about the success response, so I use a Result<Void, Error>
for return value. The problem is when I assign .success()
to it, the compiler return the following error:
Missing argument for parameter #1 in call
I have tried passing empty
, nil
, but neither can pass the compiling.
The code is like this:
var result: Result<Void, Error>?
result = .success()
How can I make it work?
result = .success(())
should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With