Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

windows: Use Rc with HCURSOR. #146

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

waywardmonkeys
Copy link
Contributor

The Cursor isn't Send / Sync, so this can just use Rc.

Since HCURSOR isn't Send / Sync, it wasn't valid to use Arc with it. This generates a clippy warning starting in Rust 1.72.

Fixes #138.

@DJMcNab
Copy link
Member

DJMcNab commented Aug 8, 2023

It's unfortunate to lose Cursor being Send - because the normal, non custom variants should still be able to be sent around.
This would be solved by #136 however

We do need a test that Cursor is consistently not Send (i.e. on all platforms), like we have for Window

@waywardmonkeys waywardmonkeys marked this pull request as draft August 8, 2023 15:51
@xStrom
Copy link
Member

xStrom commented Sep 7, 2023

As discussed during office hours, let's move this forward to satisfy clippy and I'll document the lack of Send concern in another issue.

Next steps:

  • Rebase on main to trigger the latest CI script
  • Mark as ready for review

The `Cursor` isn't `Send` / `Sync`, so this can just use `Rc`.

Since `HCURSOR` isn't `Send` / `Sync`, it wasn't valid to use `Arc`
with it. This generates a clippy warning starting in Rust 1.72.

Fixes linebender#138.
@waywardmonkeys
Copy link
Contributor Author

Rebased, force-pushed, and marked as ready for review!

Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Thanks!

@xStrom xStrom added this pull request to the merge queue Sep 7, 2023
Merged via the queue into linebender:main with commit b2ad1af Sep 7, 2023
7 checks passed
@waywardmonkeys waywardmonkeys deleted the windows-rc-hcursor branch September 8, 2023 11:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: HCursor not Send/Sync, but used with Arc
3 participants