pumpkin
pumpkin copied to clipboard
Rather than panicking when an error occurs, all functions should return a Result enum
Good library design dictates that the library itself should never panic. Instead, it should return meaningful error messages, allowing the user the control over what should happen to their program. Currently, should the user give bad inputs, the various prime generation functions panic!
. Instead, they should return some type of Result
.