4 ms·
Seems like a strawman. The thing being repeated here is something which raises if the datetime isn't in the future. So abstract that out and you then get both m
by wzdd 2y ago
Seems like a strawman. The thing being repeated here is something which raises if the datetime isn't in the future. So abstract that out and you then get both methods calling raiseIfDateTimeNotInFuture() which then also serves as documentation.
(But yes, if the actual code is as simple as this example, you may as well just repeat it.)