akka/akka — pull request #1047 by richdougherty (2013-01-22 09:56:59+00:00)
Title: Add 'requiring': like 'ensuring' but with 'require' semantics. Fixes #2798

Improves upon

require(d > Duration.Zero, "failure-detector.heartbeat-interval must be > 0"); d

by allowing the construction

d requiring (_ > Duration.Zero, "failure-detector.heartbeat-interval must be > 0")

Uses `require` internally so the semantics should be the same.

Questions:
- name?
- location - is akka.util.Helpers.Requiring, OK?
- unit tests needed?