Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing PathBuf with Utf8PathBuf #37

Open
jplatte opened this issue Apr 6, 2023 · 0 comments
Open

Consider replacing PathBuf with Utf8PathBuf #37

jplatte opened this issue Apr 6, 2023 · 0 comments

Comments

@jplatte
Copy link

jplatte commented Apr 6, 2023

… in places such as https://github.com/danigm/epub-rs/blob/master/src/doc.rs#L74.

PathBuf isn't really very portable. serde happens to support it, but only by failing (de)serialization on non-utf8 data. camino offers UTF-8 validated path types. It seems like all the paths this crate deals with are read from XML that has to be valid UTF-8 (or UTF-16, which can be converted) anyways, so this should only improve usability and not break any weird niche use cases.

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

No branches or pull requests

1 participant