Skip to content

Return IsbnError::InvalidChecksum instead of InvalidDigit when parsing#13

Open
bpeel wants to merge 5 commits intolimeburst:mainfrom
bpeel:parse-invalid-checksum-error
Open

Return IsbnError::InvalidChecksum instead of InvalidDigit when parsing#13
bpeel wants to merge 5 commits intolimeburst:mainfrom
bpeel:parse-invalid-checksum-error

Conversation

@bpeel
Copy link

@bpeel bpeel commented May 14, 2023

I think if any developers see the InvalidChecksum error in the docs they would expect the FromStr implementation to return that if the checksum is invalid. Currently it returns InvalidDigit instead, which is confusing. This PR changes that.

philippeitis and others added 5 commits December 5, 2020 03:19
The constructors for Isbn13 and Isbn10 already check the check digit as
well so it is redundant to check it in Parser as well. This also changes
the error value when the checksum is wrong to be InvalidChecksum instead
of InvalidDigit which I think makes more sense.
@limeburst
Copy link
Owner

Sorry about the year long delay! Could you update the pull request so that conflicts are resolved? Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants