Skip to content

Conversation

@bavshin-f5
Copy link
Member

Fix get_module_loc_conf result lifetime that made the Rust compiler think we're borrowing from the Request.
Expose srv_conf and main_conf.

The main/server/location configuration objects belong to the cycle and
will exist until the worker process is exiting. `'static` should help
the compiler understand that we're returning a global object instead of
borrowing from the `Request`.
Copy link
Contributor

@xeioex xeioex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good.

Use as_ref() for pointer-to-reference casts.
@bavshin-f5 bavshin-f5 force-pushed the conf-lifetime branch 2 times, most recently from 3329286 to 8984de1 Compare October 24, 2024 23:29
Copy link
Contributor

@xeioex xeioex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@bavshin-f5 bavshin-f5 merged commit e47f42d into nginx:master Oct 24, 2024
7 checks passed
@bavshin-f5 bavshin-f5 deleted the conf-lifetime branch October 24, 2024 23:39
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

Successfully merging this pull request may close these issues.

2 participants