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

Remove uses of #[path = "../lazy.rs"] #581

Closed
wants to merge 1 commit into from
Closed

Remove uses of #[path = "../lazy.rs"] #581

wants to merge 1 commit into from

Conversation

josephlr
Copy link
Member

@josephlr josephlr commented Jan 10, 2025

Now that the MSRV is >= 1.60, we can use #[cfg(target_has_atomic = "ptr")] to conditionally compile lazy.rs. We should probably also move other atomic/lazy code into lazy.rs, but that can wait for a followup PR.

I also slightly cleaned up the rndr.rs code to make things a bit more readable and to have the std implementation take precedence over the asm-based implementation. Let me know if you want me to split it off into its own PR.

Now that the MSRV is >= 1.60, we can use `#[cfg(target_has_atomic = "ptr")]`
to conditionally compile `lazy.rs`. We should probably also move other
atomic/lazy code into lazy.rs, but that can wait for a followup PR.

I also slightly cleaned up the `rndr.rs` code to make things a bit more
readable, let me know if you want me to split it off into its own PR.

Signed-off-by: Joe Richey <[email protected]>
@josephlr josephlr requested a review from newpavlov January 10, 2025 03:54
@josephlr josephlr modified the milestones: v0.3, Post 0.3 Release Jan 10, 2025
Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

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

Considering that lazy is used only in two opt-in modules, I think #[path = "../lazy.rs"] is fine, especially considering that it also allows us to remove #![allow(dead_code)]. But it could be a different story if other atomic code is moved into the lazy module.

Could you move the RNDR cleanup into a separate PR?

src/backends/rndr.rs Show resolved Hide resolved
@newpavlov newpavlov mentioned this pull request Jan 24, 2025
@newpavlov
Copy link
Member

I applied the suggested rndr tweaks in #586.

@josephlr
Copy link
Member Author

Closing as the remaining changes to the lazy module should wait until if we start moving other atomic code into the lazy module.

@josephlr josephlr closed this Jan 25, 2025
@josephlr josephlr deleted the lazy branch January 25, 2025 11:51
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