folly::Unit docs and use lift in is_void_or_unit
authorHans Fugal <fugalh@fb.com>
Wed, 27 May 2015 16:30:48 +0000 (09:30 -0700)
committerPavlo Kushnir <pavlo@fb.com>
Thu, 28 May 2015 00:54:21 +0000 (17:54 -0700)
commit496a11391648ad871f5b6441cf8c9c61f1df74d3
tree9852a5fa5a2b1b285f72e9cf7d424e573f9b4a3d
parentd07aa05e1e690ef181c52eb3bd3e70198bddd47a
folly::Unit docs and use lift in is_void_or_unit

Summary:
I'm not sure about the name Lift now. We are lifting, yes, but are we lifting into Unit, or into "can't be void because void is unit"? But LiftIntoNonVoid is a bit verbose. I'm totally open to other names or arrangements. We could also rename `is_void_or_unit`, but to what?

I reimplemented `is_void_or_unit` in terms of `Unit::Lift` because it's kinda cool but also to provide a little motivational example to the reader for why Lift exists in the first place.

Test Plan: Still builds and passes tests. Nothing significant depends on this yet.

Reviewed By: hannesr@fb.com

Subscribers: exa, folly-diffs@, jsedgwick, yfeldblum, chalfant

FB internal diff: D2102147

Tasks: 6847876

Signature: t1:2102147:1432742966:a03973a45882d3e9f6fa7158ef393b148cbe16fc
folly/futures/Unit.h