Inspectopedia Help

Redundant closure

Reports closures that are created and called in the same place.

Replaces closure call with its body.

Example:

{ (x: Int) -> () in print(x) }(42)

After the quick-fix is applied:

print(42)

Inspection Details

Available in:

AppCode 2023.3

Plugin:

Swift Language Support, 233.SNAPSHOT

Last modified: 13 July 2023