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 anymap #307

Merged
merged 4 commits into from
May 12, 2021
Merged

Remove anymap #307

merged 4 commits into from
May 12, 2021

Conversation

erickt
Copy link
Contributor

@erickt erickt commented May 10, 2021

anymap has some undefined behavior, and appears to no longer be maintained.
This patch replaces anymap with an opaque Attributes type, which contains a
number of accessor methods to get and set values. Under the covers, this type
is simply a box of a struct of option types. However, since it's opaque the
underlying type could be swapped out with an alternative type that can be
extended to support more attributes without breaking users.

Closes #306

@erickt erickt force-pushed the remove-anymap branch 2 times, most recently from 5cfe83b to 6669bd4 Compare May 10, 2021 23:37
`anymap` has some undefined behavior, and appears to no longer be maintained.
This patch replaces anymap with an opaque `EventAttributes` type, which
contains a number of accessor methods to get and set values. Under the
covers, this type is simply a box of a struct of option types. However,
since it's opaque the underlying type could be swapped out with an
alternative type that can be extended to support more attributes without
breaking users.

Closes notify-rs#306
Copy link
Member

@0xpr03 0xpr03 left a comment

Choose a reason for hiding this comment

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

Thanks for the work. Can you add a changelog entry ? See this for example

@erickt
Copy link
Contributor Author

erickt commented May 11, 2021

Thanks for the review @0xpr03! I've added a line to the changelog.

@0xpr03
Copy link
Member

0xpr03 commented May 11, 2021

Hey thanks for changing. This also needs the URL like the other line with a PR link.

@0xpr03 0xpr03 merged commit 7aa2f7b into notify-rs:main May 12, 2021
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.

Consider migrating off anymap, it contains undefined behavior
2 participants