Re:The Big TDD Misunderstanding
by yakubin on Monday March 21, 2022 @10:00AM
(#30754198)
I'd agree, if the result type was the same as the input type. However, notice that the function I wrote returns an unsigned type, so in the case of byte-sized types it would be fn abs(x: i8) -> u8, i.e. there is enough space for 128. Otherwise, good point.
[ Parent
| on HN ]
There are no comments on this comment yet.