@discardableResult is in SWIFT?

Result of call to ‘something()’ is unused

Posted by Meghdoot on Tuesday, November 20, 2018

“Result of call to ‘something()’ is unused”

Most probably you might have faced this warning but you might not bother or not take this warning seriously like me and just add “_ =” to silence this warning.

Yes, you have guessed it right.

@discardableResult is used to make function result ignored.