division by zero check to avoid panic #39
Reference in New Issue
Block a user
Delete Branch "mohr/div_zero"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'd like to compile this crate without any panics, the check will avoid one.
As
GlobalTimerCounter::frequency_to_ticksalso returns 0 in a failure path, it should be reasonable to return 0 here as well, instead of panicking.