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

Allow clippy warning for UnsafeCell in Arc #61

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

timvisee
Copy link
Member

@timvisee timvisee commented Sep 25, 2023

Our master currently fails to pass CI because clippy introduced a new warning.

It suggests not to use Arc<UnsafeCell<_>> because UnsafeCell implements !Sync, implying that Rc should be used rather than Arc.

However, the wrapping type is Send, Sync, Clone thus using an Rc is not an option.

Using SyncUnsafeCell would resolve the warning, but sadly this is not stabilized yet.

I carefully inspected the current implementation for soundness, and all seems to be good. We never use overlapping mutable slices. Though, I do think that we should restructure these core types to make better use of the type system and make misusing these types a lot harder.

Note that this also fixes use of a deprecated chrono function as it also prevents CI from succeeding.

This is currently blocking:

Cargo.toml Show resolved Hide resolved
@timvisee timvisee merged commit bc30bdb into master Sep 26, 2023
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.

3 participants