Skip to content

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

Closed
josephlr wants to merge 1 commit into
masterfrom
lazy
Closed

Remove uses of #[path = "../lazy.rs"]#581
josephlr wants to merge 1 commit into
masterfrom
lazy

Conversation

@josephlr

@josephlr josephlr commented Jan 10, 2025

Copy link
Copy Markdown
Member

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 <joerichey@google.com>
@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

@newpavlov newpavlov left a comment

Copy link
Copy Markdown
Member

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?

Comment thread src/backends/rndr.rs
@newpavlov newpavlov mentioned this pull request Jan 24, 2025
@newpavlov

Copy link
Copy Markdown
Member

I applied the suggested rndr tweaks in #586.

@josephlr

Copy link
Copy Markdown
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