feat: include the underlying error in <ZipError as Display>::fmt#483
Conversation
Signed-off-by: Luka Peschke <mail@lukapeschke.com>
Summary of ChangesHello @lukapeschke, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the user-facing error messages for I/O related Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enhances error reporting for I/O operations by modifying the Display implementation for ZipError::Io. The change includes the underlying io::Error message in the formatted output, providing more detailed and useful diagnostics when an I/O error occurs. This is a valuable improvement for users of the library, making it easier to debug issues. The implementation is correct and aligns with the existing style for other error variants.
This avois having several versions of the `zip` crate in big projects that have several transitive dependencies on it. Also, it would allow us to address ToucanToco/fastexcel#413 in fastexcel once zip-rs/zip2#483 is merged
|
Looks good; thanks! This will be merged today if CI passes. |
This PR just changes the
Displayimpl forZipError, in order to provide error details for I/O errors. It was motivated by ToucanToco/fastexcel#413 . I ran tests withcargo test --all-featuresandcargo test --no-featureson rust 1.91.1 on linux. I trust the CI to check the rest :)Please let me know if any other changes are required!