cuid::is_cuid panics on empty strings
DeppLearning opened this issue · 2 comments
DeppLearning commented
Thanks for the crate. Using it for a while now but encountered this issue today.
Instead of a panic I was expecting the method to return false. If this isn't feasible then maybe document the behavior?
Example:
cuid::is_cuid("")
-> panicked at 'byte index 1 is out of bounds of'
mplanchard commented
Thanks for the report! I agree this should return false, and I’m happy to
update it. I’m on vacation this week, but I’ll get to it as soon as
possible
…On Mon, Jul 26, 2021 at 8:32 PM DeppLearning ***@***.***> wrote:
Thanks for the crate. Using it for a while now but encountered this issue
today.
Instead of a panic I was expecting the method to return false. If this
isn't feasible then maybe document the behavior?
Example:
cuid::is_cuid("")
-> panicked at 'byte index 1 is out of bounds of'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTQRYKWIAC2ZNLCHAL3V4LTZX5DVANCNFSM5BBE6TQQ>
.
mplanchard commented