isbn-rs icon indicating copy to clipboard operation
isbn-rs copied to clipboard

Rust library for handling ISBNs.

Results 6 isbn-rs issues
Sort by recently updated
recently updated
newest added

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`...

At the current moment, it's possible to accept invalid ISBNs with digits larger than 9, since they take u8's in their constructors, which allow numbers from 0 to 255. This...

This PR includes all previous PRs. It fixes the following panics (and adds test cases for all of them): Panics on strings which were too small, or had more than...

Instead of writing each digit independently, we can collect them into an ArrayString and write all at once, reducing the number of write! calls significantly, and preventing all intermediate errors....

Parser::new(), Isbn::from_str, Isbn10::from_str, and Isbn13::from_str can panic if their input is too short, or too long, and they can create ISBNs from garbage data, and Isbn10::from_str can accept ISBNs with...

Attempting to parse empty str ("") or nonsense like "L" causes a panic. They should instead return errors.