14

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?

Sulthan
  • 128,090
  • 22
  • 218
  • 270
Yiming Dong
  • 1,530
  • 2
  • 9
  • 11

1 Answers1

36

result = .success(()) should work

SchrgCat
  • 451
  • 4
  • 5