devxoul / Then

✨ Super sweet syntactic sugar for Swift initializers
MIT License
4.18k stars 290 forks source link

Remove warnings when you don't receive value πŸ˜‚ #48

Closed Rdxer closed 6 years ago

Rdxer commented 7 years ago

Remove warnings when you don't receive value πŸ˜‚ There will be a warning

_ = view.then { (view) in

}
codecov-io commented 7 years ago

Codecov Report

Merging #48 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #48   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines           9      9           
=====================================
  Hits            9      9
Impacted Files Coverage Ξ”
Sources/Then/Then.swift 100% <ΓΈ> (ΓΈ) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 799071b...7b1bb17. Read the comment docs.

devxoul commented 7 years ago

@Rdxer you may want to use do if you'd like to just execute something with the closure.

view.do {
  $0.setNeedsLayout()
}