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

feat(metadata): remove manual Send + Sync impls for metadata types #640

Merged
merged 1 commit into from
May 12, 2021

Conversation

davidpdrsn
Copy link
Member

Removes manual Send and Sync impls for these types as they weren't
necessary:

  • metadata::Iter
  • metadata::IterMut
  • metadata::ValueDrain
  • metadata::ValueIterMut

Since all the types they contained were Send + Sync we can rely on the
compiler automatically adding the impls.

Also added some tests to ensure we don't accidentally make them !Send
or !Sync in the future.

Fixes #636

Removes manual `Send` and `Sync` impls for these types as they weren't
necessary:

- `metadata::Iter`
- `metadata::IterMut`
- `metadata::ValueDrain`
- `metadata::ValueIterMut`

Since all the types they contained were `Send + Sync` we can rely on the
compiler automatically adding the impls.

Also added some tests to ensure we don't accidentally make them `!Send`
or `!Sync` in the future.

Fixes #636
@davidpdrsn davidpdrsn added C-enhancement Category: New feature or request A-tonic labels May 12, 2021
Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

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

perfect, thanks!

@davidpdrsn davidpdrsn merged commit e97f518 into master May 12, 2021
@davidpdrsn davidpdrsn deleted the david/remove-manual-send-sync-impls branch May 12, 2021 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tonic C-enhancement Category: New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is Sync for Iter necessary?
2 participants