Conversation
Summary of ChangesHello @Its-Just-Nans, 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 streamlines the project's conditional compilation logic by eliminating custom Highlights
Changelog
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.
This PR successfully removes the custom cfg_if and cfg_if_expr macros in favor of standard Rust conditional compilation syntax. The refactoring is clean and maintains functional equivalence across all changes. The macro removal simplifies the codebase without introducing any defects or regressions.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
Code Review
This pull request is a great improvement to the codebase. It successfully removes the custom cfg_if and cfg_if_expr macros from macros.rs and replaces their usage throughout the project with standard #[cfg] attributes. This refactoring enhances code clarity and maintainability by using built-in language features. The changes in src/compression.rs, src/read.rs, src/types.rs, src/write.rs, and src/zipcrypto.rs correctly preserve the original conditional compilation logic. The removal of src/macros.rs and the corresponding module registration in src/lib.rs completes this cleanup. Overall, this is a solid contribution that simplifies the code without altering functionality.
|
ON the function Lines 452 to 489 in 8896502 why we are doing let Ok(target_str) = std::str::from_utf8(target) else {
return Err(invalid!("Invalid UTF-8 as symlink target"));
}; on every platform. But we don't use |
Pr0methean
left a comment
There was a problem hiding this comment.
Overall good; I like how this manages to decrease the line count!
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
cc866a7 to
1e1493e
Compare
I think the macros that we are using in
macros.rsare not that useful, and add more complexity.First commit removing
cfg_if!Second commit removing
cfg_if_else!