refactor(sys): move implementations from the crate top#274
Open
bavshin-f5 wants to merge 1 commit intonginx:mainfrom
Open
refactor(sys): move implementations from the crate top#274bavshin-f5 wants to merge 1 commit intonginx:mainfrom
bavshin-f5 wants to merge 1 commit intonginx:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors nginx-sys by moving the Rust-side extensions for NGINX “core” headers (e.g., queue/rbtree/string helpers and related impls) out of the crate root into a dedicated internal module, addressing Solaris warnings from private modules shadowing glob re-exports.
Changes:
- Introduces a new
coremodule and relocates several helper impls/functions intonginx-sys/src/core.rsandnginx-sys/src/core/*. - Updates crate-root re-exports to continue exposing the same public surface while avoiding the previous shadowing warning.
- Reorganizes bindgen lint allowances in the
bindingsmodule.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| nginx-sys/src/lib.rs | Adds the new internal core module and adjusts re-exports / bindings lint allows. |
| nginx-sys/src/core.rs | New module collecting core-related helper impls and functions previously at crate root. |
| nginx-sys/src/core/string.rs | New ngx_str_t extension methods plus tests. |
| nginx-sys/src/core/queue.rs | New queue helpers/macros plus tests. |
| nginx-sys/src/core/rbtree.rs | New rbtree helpers/macros. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
All src/core/ngx_*.h extensions are now defined under nginx_sys::core, which is cleaner logically and also avoids warnings on Solaris due to name conflicts. This does not affect the external API, everything is still reexported from the top of the crate.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All src/core/ngx_*.h extensions are now defined under nginx_sys::core, which is cleaner logically and also avoids warnings on Solaris due to name conflicts.
This does not affect the external API, everything is still reexported from the top of the crate.
The warning in question: